我发现使用ymuski/curl-http3 docker 镜像最简单:
docker run --rm ymuski/curl-http3 curl --http3 https://example.org/
Run Code Online (Sandbox Code Playgroud)
注意:与其他 HTTP/3 客户端不同,curl 不会首先使用旧版 HTTP 来访问页面以找出其在标头中的 HTTP/3 位置Alt-Svc。这意味着如果 HTTP/3 正在侦听另一个主机/端口,则必须在curl 调用中使用该主机/端口。
您必须构建实验版本,它尚未作为包发布。
cd ..
git clone https://github.com/curl/curl
cd curl
./buildconf
LDFLAGS="-Wl,-rpath,<somewhere1>/lib" ./configure --with-ssl=<somewhere1> --with-nghttp3=<somewhere2> --with-ngtcp2=<somewhere3>
make
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7585 次 |
| 最近记录: |