V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
thisismr2
V2EX  ›  cURL

curl 稳定版终于支持 HTTP3 了

  •  1
     
  •   thisismr2 · 134 天前 · 3272 次点击
    这是一个创建于 134 天前的主题,其中的信息可能已经有所发展或是发生改变。

    curl 稳定版终于支持 HTTP3 了

    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 支持不好,终将退出历史舞台
    • 在 Windows 上,curl 和 firefox 一样使用自己的证书
    第 1 条附言  ·  133 天前
    15 条回复    2023-12-16 11:25:40 +08:00
    Masoud2023
        1
    Masoud2023  
       134 天前
    你的这个 nami 在 Windows 下和 Scoop 比有什么优势?
    weeei
        2
    weeei  
       134 天前
    macOS 上用 macports 也可以啊

    sudo port install curl +gnutls +http2 +http3
    mohumohu
        3
    mohumohu  
       134 天前
    看了眼 alpine ,curl 早就是带 http3 的。
    windows 还是用 wsl 一把梭方便。
    thisismr2
        4
    thisismr2  
    OP
       134 天前
    @Masoud2023 没优势,就一个二进制文件
    thisismr2
        5
    thisismr2  
    OP
       134 天前
    @weeei brew 是不是也有类 port 的此类参数
    thisismr2
        6
    thisismr2  
    OP
       134 天前
    #4 下载的 curl 也是单个独立文件
    lovelylain
        7
    lovelylain  
       134 天前 via Android
    nginx 支持了吗
    jim9606
        8
    jim9606  
       134 天前
    1. 就算是浏览器也会在启用代理的时候禁用 HTTP3/QUIC ,因为并不能受益于 HTTP3 的改进
    2. curl 可以编译为使用 schannel ,这时就用系统证书了
    cccer
        9
    cccer  
       134 天前
    @lovelylain 主线版本支持了,一些包管理可能差一个版本。
    heiher
        10
    heiher  
       134 天前
    socks5 协议支持 udp 代理本不存在障碍,问题在于实现。
    deorth
        11
    deorth  
       134 天前 via Android
    socks5 坏就坏在 udp 支持是可选的。我等客户端支持 h3 over socks5 一百年了
    weeei
        12
    weeei  
       134 天前
    @jim9606 最大的问题是国内的运营商对于 udp 的 QoS ,导致 udp 体验很差。
    thisismr2
        13
    thisismr2  
    OP
       134 天前
    @jim9606 嗯,是的
    thisismr2
        14
    thisismr2  
    OP
       134 天前
    @deorth 应该希望不大了,一来很多没实现,二来实现了的有很多不标准,三来 socks5 的 UDP 协议标准本身就有点绕

    https://www.txthinking.com/talks/articles/socks5-and-http-proxy.article
    terrytw
        15
    terrytw  
       133 天前
    @weeei 赞同,UDP 的 QOS 不搞定,在国内推行 HTTP3 不现实
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   926 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:44 · PVG 03:44 · LAX 12:44 · JFK 15:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.