treexie:
今天,我们向大家介绍一款强大的 HTTP 各阶段可视化工具 —— http-stat-rs,这是一款用 Rust 语言开发的现代化 HTTP 各阶段耗时工具,参考 golang 版本的 httpstat 。预编译程序的下载地址:https://github.com/vicanso/http-stat-rs/releases
为什么选择 http-stat-rs ?
- 全协议支持
全面支持 HTTP/1.1 、HTTP/2 和 HTTP/3 协议,支持 ALPN (应用层协议协商) h2, http/1.1 ,让您轻松测试不同 HTTP 协议版本的性能表现
- 更多现代高化压缩算法支持,gzip ,Brotli (br),Zstandard (zstd)
- 强大的 DNS 解析功能,可以直接指定域名对应多个 IP 地址,或指定只解析 ipv4 或 ipv6 的
- 跨平台支持提供 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