Brook Shiliew Cheap Zhi Meeting Nan mitmproxy client Network Activity Monitor iOS Old App Downloader SSH Terminal Subtitle 菜根谭 Socks5 Configurator IPvBar File Link Markdown Editor IP AI nami joker brook ipio nico z zoro hancock mad httpserver google hosts

curl 稳定版终于支持 HTTP3 了

Updated at: 2023-12-15

背景

curl 一直是一个很棒的测试 HTTP 网络的工具。甚至有些分前后端的公司里,前后端对接写文档来描述 HTTP 接口时,因为大家认知的差异常会导致反复沟通扯皮,写的他妈什么接口文档,嘿,不如直接写一行 curl 命令,直接粘贴到命令行回车就可以知道接口是否正常工作,再说接口不通就说不过去了。可见其近乎一个参考实现。

而今,curl 最新版对 HTTP3 的支持已经不再是实验性质的。但截止本文众多包管理器仍无法下载到新版。当然,你有 nami

安装

你可以在 Linux, macOS, Windows 上用 nami 来安装 curl

nami install curl

使用 HTTP3

你可能需要重新打开个终端

curl --http3-only https://http3.ooo -v

注意事项

  • HTTP 代理和 Socks5 代理因为对 HTTP3 支持不好,终将退出历史舞台

  • 此静态编译的 curl 不使用系统证书,如果你正在调试 ipio, brook, shiliew, 试试:

    curl --cacert ~/.nami/bin/ca.pem ...
    

https://curl.se/docs/sslcerts.html

© TxThinking, Inc. All Rights Reserved.