http-stat-rs:纯 rust 实现的类 curl 工具 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
treexie
V2EX    分享创造

http-stat-rs:纯 rust 实现的类 curl 工具

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

    今天,我们向大家介绍一款强大的 HTTP 各阶段可视化工具 http-stat-rs,这是一款用 Rust 语言开发的现代化 HTTP 各阶段耗时工具,参考 golang 版本的 httpstat 。预编译程序的下载地址:https://github.com/vicanso/http-stat-rs/releases

    为什么选择 http-stat-rs ?

    1. 全协议支持 全面支持 HTTP/1.1 、HTTP/2 和 HTTP/3 协议,支持 ALPN (应用层协议协商) h2, http/1.1 ,让您轻松测试不同 HTTP 协议版本的性能表现
    2. 更多现代高化压缩算法支持,gzip ,Brotli (br),Zstandard (zstd)
    3. 强大的 DNS 解析功能,可以直接指定域名对应多个 IP 地址,或指定只解析 ipv4 或 ipv6 的
    4. 跨平台支持提供 Windows 、macOS 和 Linux 的预编译二进制文件,无任何其它的依赖,开箱即用
    httpstat visualizes curl(1) statistics in a way of beauty and clarity. Usage: httpstat [OPTIONS] [URL_ARG] Arguments: [URL_ARG] url to request Options: -u, --url <URL> URL to request (optional, can be provided as the last argument) -H <HEADERS> set HTTP header; repeatable: -H 'Accept: ...' -H 'Range: ...' -4 resolve host to ipv4 only -6 resolve host to ipv6 only -k skip verify tls certificate -o <OUTPUT> output file -L follow 30x redirects -X <METHOD> HTTP method to use (default GET) -d, --data <DATA> the body of a POST or PUT request; from file use @filename --resolve <RESOLVE> resolve the request host to specific ip address (e.g. 1.2.3.4,1.2.3.5) --compressed request compressed response: gzip, br, zstd --http3 use http/3 --http2 use http/2 --http1 use http/1.1 -s silent mode -h, --help Print help -V, --version Print version 

    示例:

    httpstat --http3 https://cloudflare-quic.com/ Connected to 104.22.9.38:443 H3 200 OK Tls: tls 1.3 Cipher: AES_256_GCM_SHA384 Not-Before: 2025-04-27 23:05:22 +08:00 Not-After: 2025-07-27 00:04:40 +08:00 Date: Wed, 21 May 2025 14:07:16 GMT Content-Type: text/html Content-Length: 125959 Priority: u=3,i=?0 Server: cloudflare Cf-Ray: 9434a39c6c1ced3b-SJC Alt-Svc: h3=":443"; ma=86400 Server-Timing: cfExtPri DNS Lookup QUIC Connect Server Processing Content Transfer [ 232ms | 784ms | 384ms | 3.07s ] | | | | Total:4.47s 
    3 条回复    2025-05-22 20:07:22 +08:00
    aa51513
        1
    aa51513  
       192 天前
    不考虑上各大 Linux 发行版的软件仓库吗?
    kekeones
        2
    kekeones  
       191 天前
    试了下,一直是 Error: timeout error deadline has elapsed
    treexie
        3
    treexie  
    OP
       191 天前
    @aa51513 暂时没有此计划,直接下载可执行文件即可


    @kekeones 是请求哪个 url 呢?`https://cloudflare-quic.com/` 不是所有地区都能连得上
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2577 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 22ms UTC 03:18 PVG 11:18 LAX 19:18 JFK 22:18
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86