今天,我们向大家介绍一款强大的 HTTP 各阶段可视化工具 —— http-stat-rs,这是一款用 Rust 语言开发的现代化 HTTP 各阶段耗时工具,参考 golang 版本的 httpstat 。预编译程序的下载地址:https://github.com/vicanso/http-stat-rs/releases
为什么选择 http-stat-rs ?
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
|      1aa51513      162 天前 不考虑上各大 Linux 发行版的软件仓库吗? | 
|      2kekeones      162 天前 试了下,一直是 Error: timeout error deadline has elapsed | 
|  |      3treexie OP |