About this project
CloudflareSpeedTest (CFST) is an open-source command-line network speed testing tool, mainly used to filter out IPs that are more friendly to one's own network environment from the large number of public IP ranges of Cloudflare CDN. The project description points out that the IPs Cloudflare assigns to visitors from mainland China often have high latency, many packet drops, and slow speeds, and manually selecting from a massive number of IPs is unrealistic, so this tool solves this problem through automatic speed testing. In addition to Cloudflare, it also supports latency testing for other CDNs or websites with multiple resolved IPs, but the download speed test address must be specified manually.
Main capabilities
- Latency testing: By default, TCPing mode is used, and it can also be switched to HTTP protocol mode via -httping; HTTPing reads the response headers and can determine availability based on the HTTP status code.
- Download speed testing: After sorting by latency, download speed testing is performed sequentially starting from the IP with the lowest latency, and by default it stops after testing 10.
- Result sorting and output: First filter by latency sorting, then sort by download speed, and by default display the 10 fastest IPs in the terminal and write them to the result.csv file.
- Address support: Supports both IPv4 and IPv6, and can test them in a mixed manner; IP ranges can come from built-in files, custom files, or command-line parameters.
- Region code recognition: During HTTPing or download speed testing, obtain the IP's current region code from the response headers, supporting CDNs such as Cloudflare, AWS CloudFront, Fastly, Gcore, CDN77, and Bunny, and can filter by region using -cfcolo.
Common parameters
- -n number of latency testing threads, -t number of tests per IP, -dn number of download speed tests, -dt duration of download speed test per IP.
- -tp specify the testing port, -url specify the testing address.
- -tl average latency upper limit, -tll average latency lower limit, -tlr packet loss rate upper limit, -sl download speed lower limit.
- -p number of results to display, -f specify the IP range file, -ip directly specify the IP range, -o specify the result output file.
- -dd disable download speed testing, -allip test every IPv4 address within the IP range, -debug output debug logs.
Usage
Precompiled executables are provided for Windows, Linux, and macOS. On Windows, it can be run directly by double-clicking, and it can also be installed via scoop; on Linux/macOS, it needs to be run in the terminal with execute permission granted. The documentation also explains how to run it with parameters in CMD, PowerShell, and shortcuts, as well as notes on relative paths and absolute paths.
Notes
The project clearly warns that Cloudflare CDN prohibits use as a proxy, and using a proxy over CDN is at your own risk; this tool is not suitable for selecting optimal IPs for Cloudflare WARP, which uses the UDP protocol. HTTPing is essentially a network scanning behavior, and when running on a server it is recommended to reduce concurrency to avoid triggering temporary restrictions from the ISP or CDN. It is normal for speed test results to differ each time, because each IP range randomly selects IPs for testing.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.