在Ubuntu 16.04.4 LTS上调研开源QUIC项目ngtcp2
生活随笔
收集整理的這篇文章主要介紹了
在Ubuntu 16.04.4 LTS上调研开源QUIC项目ngtcp2
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
最近在研究QUIC協(xié)議,嘗試了一些QUIC相關的開源項目,主要是c,c++,go等語言編寫的。這里記錄下我折騰ngtcp2的過程。
基本思路就是參照github上該項目的README來進行就可以了。由于是Ubuntu 16.04,很多依賴基本上都滿足了,比如gcc版本是5.4.0。QUIC依賴的TLS 1.3是安裝在openssl的源碼目錄下面,沒有安裝到系統(tǒng)庫中,這一點使用時比較方便。
git clone --depth 1 https://github.com/openssl/openssl
cd openssl
./config enable-tls1_3 --prefix=$PWD/build
make -j$(nproc)
git clone https://github.com/ngtcp2/ngtcp2
cd ngtcp2
autoreconf -i
cd examples
openssl genrsa -out server.key 2048
openssl req -new -x509 -key server.key -out server.crt -days 3650
打開兩個終端,分別開啟client和server
./client 127.0.0.1 4433 -i
[1].https://github.com/ngtcp2/ngtcp2
基本思路就是參照github上該項目的README來進行就可以了。由于是Ubuntu 16.04,很多依賴基本上都滿足了,比如gcc版本是5.4.0。QUIC依賴的TLS 1.3是安裝在openssl的源碼目錄下面,沒有安裝到系統(tǒng)庫中,這一點使用時比較方便。
git clone --depth 1 https://github.com/openssl/openssl
cd openssl
./config enable-tls1_3 --prefix=$PWD/build
make -j$(nproc)
make install_sw
git clone https://github.com/ngtcp2/ngtcp2
cd ngtcp2
autoreconf -i
./configure PKG_CONFIG_PATH=$PWD/../openssl/build/lib/pkgconfig LDFLAGS="-Wl,-rpath,$PWD/../openssl/build/lib"
cd examples
openssl genrsa -out server.key 2048
openssl req -new -x509 -key server.key -out server.crt -days 3650
打開兩個終端,分別開啟client和server
./client 127.0.0.1 4433 -i
./server 127.0.0.1 4433 server.key server.crt
所有操作過程和項目README上的完全相同。
[1].https://github.com/ngtcp2/ngtcp2
總結
以上是生活随笔為你收集整理的在Ubuntu 16.04.4 LTS上调研开源QUIC项目ngtcp2的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 在Ubuntu 16.04.3 LTS上
- 下一篇: 在CentOS 6.9上从源码安装Go