Measure it with one fixed-size file, downloaded several times on fresh connections, directly and through each proxy in turn, and compare the medians. Bytes divided by the time the body took gives MB/s for each round, and the spread between rounds tells you whether one number means anything. A single speed-test result is mostly noise: the minute you ran it, the route that day, and the server you happened to hit. throughput_test.py serves the test file itself (any size, optionally over TLS, optionally capped to imitate a slower link) and runs the comparison, with the Python standard library only. Proxy302 maintains this tool and sells proxies. Our static residential (ISP) IPs cost $7.99 for 30 days or $0.50 for a one-day test, the same in every country (prices); the tool works with any provider's HTTP or SOCKS5 proxy.
Maintained by Proxy302. MIT licensed. Tested on macOS with Python 3.9.6.
Put the file on a server you control, ideally in the region your real traffic goes to, so that every run downloads exactly the same bytes:
# on the server: a 20 MB file of random bytes (random so nothing can compress it)
python3 throughput_test.py serve --port 8000 --size-mb 20Then, from your computer:
python3 throughput_test.py run direct "http://USER:PASS@HOST:PORT" --url http://SERVER-IP:8000/test.bin
python3 throughput_test.py run direct "http://USER:PASS@HOST:PORT" "socks5h://USER:PASS@HOST2:PORT2" --url http://SERVER-IP:8000/test.bin --rounds 10 --pause 30USER, PASS, HOST and PORT are placeholders; percent-encode @ : / # % in a password written as a URL, or pass HOST:PORT:USER:PASS (read as HTTP). Python 3.8 or later, nothing to install. direct is the baseline without a proxy; always include it, because a slow result through the proxy means little if your own line is just as slow.
serve option |
What it does |
|---|---|
--port, --bind |
Where to listen (default 0.0.0.0:8000) |
--size-mb N |
File size in MB (default 20). Every path answers the same file |
--limit-mbps N |
Cap each download at N MB/s, to imitate a slower link in tests |
--cert PEM --key PEM |
Serve HTTPS, so the downloads also pass through a TLS tunnel like real traffic |
run option |
What it does |
|---|---|
--url URL |
The file to download, http:// or https:// (required) |
--rounds N |
Downloads per path (default 5). Paths take turns, so a slow minute hits all of them |
--pause S |
Wait between rounds, to spread a run over a longer time |
--cafile PEM, --insecure |
Trust a self-signed certificate, or skip the check |
--timeout S |
Socket timeout (default 30) |
Each round is one fresh connection: TCP to the proxy, the proxy handshake (CONNECT or SOCKS5), TLS if the URL is https://, then a single GET. A download that ends before its Content-Length is marked INCOMPLETE and left out of the averages, and so is any answer other than 200. The exit code is 1 if any round failed that way, otherwise 0.
Recorded on 27 November 2026 on a Mac. The server holds a 20 MB file, serves it over TLS as localhost:27201 and caps every download at 8 MB/s, standing in for a link of that speed. The proxies are mock-proxy-server, HTTP and SOCKS5 with a login, on the same machine:
python3 throughput_test.py serve --bind 127.0.0.1 --port 27201 --size-mb 20 --limit-mbps 8 --cert cert.pem --key key.pem --quiet
python3 mock_proxy.py --http 27228 --socks 27280 --user alice --password s3cret --quiet$ python3 throughput_test.py run direct http://alice:s3cret@127.0.0.1:27228 socks5h://alice:s3cret@127.0.0.1:27280 --url https://localhost:27201/test.bin --rounds 5 --cafile cert.pem
url https://localhost:27201/test.bin
rounds 5 per path, one fresh connection each, paths taken in turn
round via MB connect 1st byte body s MB/s status
1 direct 20.0 5ms 6ms 2.50 8.00 200
1 http://alice:****@127.0.0.1:27228 20.0 20ms 21ms 2.50 8.00 200
1 socks5h://alice:****@127.0.0.1:27280 20.0 11ms 11ms 2.50 8.00 200
2 direct 20.0 7ms 7ms 2.50 8.00 200
2 http://alice:****@127.0.0.1:27228 20.0 12ms 13ms 2.50 7.99 200
2 socks5h://alice:****@127.0.0.1:27280 20.0 8ms 9ms 2.50 8.00 200
3 direct 20.0 3ms 4ms 2.50 8.00 200
3 http://alice:****@127.0.0.1:27228 20.0 10ms 11ms 2.50 8.00 200
3 socks5h://alice:****@127.0.0.1:27280 20.0 3ms 4ms 2.50 8.00 200
4 direct 20.0 3ms 4ms 2.50 7.99 200
4 http://alice:****@127.0.0.1:27228 20.0 7ms 9ms 2.50 8.00 200
4 socks5h://alice:****@127.0.0.1:27280 20.0 3ms 3ms 2.50 7.99 200
5 direct 20.0 2ms 2ms 2.50 7.99 200
5 http://alice:****@127.0.0.1:27228 20.0 11ms 13ms 2.50 8.00 200
5 socks5h://alice:****@127.0.0.1:27280 20.0 7ms 9ms 2.50 8.00 200
MB/s over complete downloads (MB = 1,000,000 bytes; x8 for Mbit/s)
via ok median mean stdev min max spread
direct 5/5 8.00 8.00 0.00 7.99 8.00 0.0%
http://alice:****@127.0.0.1:27228 5/5 8.00 8.00 0.00 7.99 8.00 0.0%
socks5h://alice:****@127.0.0.1:27280 5/5 8.00 8.00 0.00 7.99 8.00 0.0%
http://alice:****@127.0.0.1:27228: 100% of the direct median
socks5h://alice:****@127.0.0.1:27280: 100% of the direct median
spread = standard deviation / mean. Under about 10% the path is steady; well above it, run more rounds at different times before judging.
All three paths hit the 8 MB/s cap, which is what a healthy proxy does when the link, not the proxy, is the limit. connect includes the proxy handshake and TLS, so it is a little higher through the proxies. The same run without --limit-mbps gave medians of 8,475 MB/s direct and about 3,240 MB/s through either proxy: Python reads several gigabytes a second through a local relay, so the script itself will not be what limits a real proxy.
A server that announces 2 MB and closes the connection after 0.7 MB shows how a cut-off download is reported (exit code 1):
round via MB connect 1st byte body s MB/s status
1 direct 0.7 2ms 3ms 0.00 5575.82 200 INCOMPLETE: 0.7 of 2.0 MB
1 http://alice:****@127.0.0.1:27228 0.7 0ms 2ms 0.00 1467.38 200 INCOMPLETE: 0.7 of 2.0 MB
And a wrong password gives 407 (not counted) with - in the MB/s column.
| What you see | What it usually means |
|---|---|
| Proxy median close to direct, small spread | The proxy is not your bottleneck for this route |
| Proxy median well below direct, small spread | A steady limit somewhere on the proxy path: the proxy's own line, or the extra distance from you to the proxy and on to the server |
| Large spread (well over 10%) | A busy route or time of day. Rerun with --rounds 10 --pause 60, and again at another hour |
connect high, MB/s fine |
Distance to the proxy. Matters for many small requests, not for large downloads |
INCOMPLETE rounds |
Something cut the transfer. Check the proxy's timeouts and your client's, and retry before blaming the line |
A few things that change the numbers more than the protocol does:
- Distance. One TCP connection moves less data per second the longer the round trip. A proxy in another continent from both you and the server costs throughput even when nothing is wrong.
- The server. Test against a server near where your real traffic goes. A file next to you measures a different route than the sites you use.
- Rotating proxies. Each fresh connection may leave from a different exit, so the spread is naturally wider. Look at the median and the slowest round.
- Size. Below a few MB, the handshake dominates and the figure understates the line. 20 MB or more gives a steadier number.
On plans charged per GB, every round is real traffic: 5 rounds of a 20 MB file is 100 MB per path. A static IP has one protocol, so comparing HTTP with SOCKS5 on your own account means two IPs, ideally in the same city.
- proxy-speed-test: how much latency a proxy adds
- http-vs-socks5-ttfb: handshake round trips and time to first byte, HTTP vs SOCKS5
- 代理 IP 很慢,怎么判断慢在哪一段? (Chinese)
- mock-proxy-server: a local HTTP and SOCKS5 proxy for tests
Facts checked 27 November 2026.