Speed Test
Hysteria (since 2.3.0) has a built-in speed test tool that allows a client to test both download and upload speed with a server, given that the server has enabled speed test support in its configuration.
Note: Speed test follows the bandwidth settings you have in the config just like the normal proxy mode. It will not probe the maximum bandwidth for you if you are using Brutal congestion control.
By default, it uses time-based mode, testing both download and upload for 10 seconds each. You can also switch to size-based mode by specifying --data-size, which transfers a fixed number of bytes instead.
Usage:
hysteria speedtest [flags]
Flags:
--data-size uint32 Data size in bytes (switches to size-based mode when set)
--duration duration Duration for each direction in time-based mode (default 10s)
-h, --help help for speedtest
--skip-download Skip download test
--skip-upload Skip upload test
--use-bytes Use bytes per second instead of bits per second
Examples:
# Default: time-based, 10s each direction
./hysteria speedtest
# Time-based with custom duration
./hysteria speedtest --duration 30s
# Size-based: transfer 200 MB each direction
./hysteria speedtest --data-size 209715200
Speed test connections are handled internally by the server and thus aren't affected by things like ACL and outbounds. However, traffic generated by speed tests will still be counted in the traffic statistics for that user.