[curl-http3: 基于quiche+boringssl编译]

官方文档

rust

shell 复制代码
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

source $HOME/.cargo/env

quiche + boringssl

shell 复制代码
git clone --recursive -b 0.24.5 https://github.com/cloudflare/quiche

cd quiche

# sudo dnf install -y gcc gcc-c++ make cmake
cargo build --package quiche --release --features ffi,pkg-config-meta,qlog

ln -s libquiche.so target/release/libquiche.so.0

mkdir quiche/deps/boringssl/src/lib

ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) quiche/deps/boringssl/src/lib/

curl

shell 复制代码
cd ..
git clone https://github.com/curl/curl

cd curl

# sudo dnf install -y automake autoconf libtool libpsl libpsl-devel
autoreconf -fi

./configure LDFLAGS="-Wl,-rpath,$PWD/../quiche/target/release" --with-openssl=$PWD/../quiche/quiche/deps/boringssl/src --with-quiche=$PWD/../quiche/target/release

make

sudo make install

测试

shell 复制代码
[idoly@OuO ~]$ curl -I --http3 --noproxy '*' https://cloudflare-quic.com
HTTP/3 200
date: Sun, 26 Oct 2025 12:48:46 GMT
content-type: text/html
cf-ray: 994a11e5afbd265a-LAX
priority: u=3,i=?0
server: cloudflare
alt-svc: h3=":443"; ma=86400
server-timing: cfExtPri
相关推荐
Lsetea18 天前
curl指定--tlsv1.2仍连接TLS1.3:最低版本与tls-max排查
linux·https·ssl证书·curl·tls
Lsetea18 天前
curl访问HTTPS报47 Too many redirects:重定向循环与max-redirs排查
linux·http·https·ssl证书·curl
Lsetea19 天前
curl下载HTTPS正文是乱码:--compressed与Content-Encoding分层排查
linux·http·https·ssl证书·curl
Lsetea20 天前
curl下载HTTPS文件报23:证书验证成功与本地写入失败分层排查
linux·https·shell·ssl证书·curl
Lsetea20 天前
curl访问HTTPS返回304却没有正文:条件请求、缓存与证书验收排查
linux·http·https·ssl证书·curl
Lsetea21 天前
curl -I检查HTTPS返回405:HEAD、GET与证书验收分层排查
linux·http·https·ssl证书·curl
Lsetea24 天前
curl访问HTTPS报28 Operation timed out:连接超时与总超时分层排查
运维·https·ssl证书·curl·tls
Lsetea1 个月前
curl设置SSL_CERT_FILE仍报60:CURL_CA_BUNDLE与CA路径优先级排查
linux·https·ssl证书·openssl·curl
Lsetea1 个月前
curl走HTTPS代理报SSL证书错误:proxy-cacert与cacert双层信任排查
linux·https·ssl证书·curl·代理服务器
Lsetea1 个月前
curl报91 No OCSP response received:cert-status与OCSP装订排查
https·ssl证书·openssl·curl·ocsp