在Ubuntu 16.04.4 LTS上调研开源QUIC项目ngtcp2

前端之家收集整理的这篇文章主要介绍了在Ubuntu 16.04.4 LTS上调研开源QUIC项目ngtcp2前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
最近在研究QUIC协议,尝试了一些QUIC相关的开源项目,主要是c,c++,go等语言编写的。这里记录下我折腾ngtcp2的过程。 @H_403_1@基本思路就是参照github上该项目的README来进行就可以了。由于是Ubuntu 16.04,很多依赖基本上都满足了,比如gcc版本是5.4.0。QUIC依赖的TLS 1.3是安装在openssl的源码目录下面,没有安装到系统库中,这一点使用时比较方便。 @H_403_1@ @H_403_1@ @H_403_1@git clone --depth 1 https://github.com/openssl/openssl @H_403_1@cd openssl @H_403_1@./config enable-tls1_3 --prefix=$PWD/build @H_403_1@make -j$(nproc) @H_403_1@

make install_sw

@H_403_1@

@H_403_1@

@H_403_1@

@H_403_1@

@H_403_1@

cd .. @H_403_1@git clone https://github.com/ngtcp2/ngtcp2 @H_403_1@cd ngtcp2 @H_403_1@autoreconf -i @H_403_1@

@H_403_1@

@H_403_1@

@H_403_1@

./configure PKG_CONFIG_PATH=$PWD/../openssl/build/lib/pkgconfig LDFLAGS="-Wl,-rpath,$PWD/../openssl/build/lib"

@H_403_1@

make -j$(nproc) check

@H_403_1@

@H_403_1@

生成证书和密钥 @H_403_1@cd examples @H_403_1@openssl genrsa -out server.key 2048 @H_403_1@openssl req -new -x509 -key server.key -out server.crt -days 3650 @H_403_1@ @H_403_1@打开两个终端,分别开启client和server @H_403_1@./client 127.0.0.1 4433 -i @H_403_1@ @H_403_1@

./server 127.0.0.1 4433 server.key server.crt

@H_403_1@

所有操作过程和项目README上的完全相同。

@H_403_1@

参考文献 [1].https://github.com/ngtcp2/ngtcp2

猜你在找的Ubuntu相关文章