21 releases (4 breaking)

new 0.5.5 Jun 11, 2025
0.5.4 Jun 7, 2025
0.5.1 May 31, 2025
0.4.9 May 27, 2025
0.1.1 May 5, 2025

#685 in Network programming

Download history 141/week @ 2025-04-29 409/week @ 2025-05-06 651/week @ 2025-05-13 377/week @ 2025-05-20 400/week @ 2025-05-27 406/week @ 2025-06-03

1,884 downloads per month

MIT license

72KB
1.5K SLoC

http-stat-rs

Imitation is the sincerest form of flattery.

Pure rust version of http statistics, which refer to httpstat.

  • Supports http1, http2 and http3
  • Default alpn is h2, http/1.1
  • Supports multi compressions: gzip, br, zstd
  • Supports testing multiple ips simultaneously for host, or set dns server to resolve host

中文

screenshot

Release

Pre-built binaries for windows, macos and linux.

linux

curl -L https://github.com/vicanso/http-stat-rs/releases/latest/download/httpstat-linux-musl-$(uname -m).tar.gz | tar -xzf -
sudo mv httpstat /usr/local/bin/

macos

curl -L https://github.com/vicanso/http-stat-rs/releases/latest/download/httpstat-darwin-$(uname -m).tar.gz | tar -xzf -
sudo mv httpstat /usr/local/bin/

Installation

cargo install http-stat

Usage

httpstat --http3 https://cloudflare-quic.com/

httpstat https://www.xiaohongshu.com/explore --http3 --compressed 

httpstat --resolve=183.240.99.169,2409:8c54:870:310:0:ff:b0ed:40ac -s https://www.baidu.com/

Features

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

License

http-stats-rs is provided under the MIT license. See LICENSE.

Dependencies

~39–70MB
~1M SLoC