curl支持http3(quiche)编译

  • 参考网址 

HTTP/3 with curlhttps://curl.se/docs/http3.html

  • quiche源码地址
https://github.com/cloudflare/quiche
  • boring_ssl地址 (放到quiche/quiche/deps/boringssl/)
https://github.com/google/boringssl.git
  • 安装cmake
apt install cmake
  • 安装其他工具
apt install autoconf
apt install libtool

 

  • 安装go语言
apt install golang
  • rust cargo配置http代理 
https://blog.csdn.net/xieyou/article/details/125830138
  • 编译quiche
cd quiche/
cargo build --package quiche --release --features ffi,pkg-config-meta,qlog
mkdir quiche/deps/boringssl/lib
ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) quiche/deps/boringssl/lib/

如果编译过程中报找不到libcrypto和libssl,则需要修改quiche/src/build.rs

println!("cargo:rustc-link-search=native={}", build_dir);
修改为
println!("cargo:rustc-link-search=native={}/crypto", build_dir);
println!("cargo:rustc-link-search=native={}/ssl", build_dir);

需要删除或重命名target/release/libquiche.so,否则在编译curl时执行configure命令会失败,打开config.log可以看到如下报错

/usr/bin/ld: conftest: hidden symbol `X509_STORE_CTX_init' in /code/curl-7.84.0/../quiche-0.14.0/quiche/deps/boringssl//lib/libcrypto.a(x509_vfy.c.o) is referenced by DSO

 

  • 编译curl
#下载代码
git clone https://github.com/curl/curl
#编译
autoreconf -fi
./configure LDFLAGS="-Wl,-rpath,$PWD/../quiche-0.14.0/target/release" --with-openssl=$PWD/../quiche-0.14.0/quiche/deps/boringssl/ --with-quiche=$PWD/../quiche-0.14.0/target/release
make

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值