How xiu2/cloudflarespeedtest works
CloudflareSpeedTest is a command-line tool for finding fast, low-latency CDN or website IPs. Its main workflow loads IP ranges, probes candidates by TCP or optional HTTP, filters and ranks the latency results, optionally measures download speed, then prints and exports the results. The README also documents IPv4/IPv6 input, configurable test parameters, region filtering, and CSV output. The graph follows the sampled runtime calls; ancillary scripts are omitted because their behavior and connections were not sampled.
Main entry points: main.go CLI workflow · tcping.go Probe coordinator · download.go Download speed tests · ip.go IP range loader
Components 13
CLI orchestration
- CLI workflow
main.go
Candidate testing
- IP range loader
task/ip.go - Probe coordinator
task/tcping.go - TCP probes
task/tcping.go - HTTP probes
task/httping.go - Download speed tests
task/download.go
Results and filtering
- Latency and loss filters
utils/csv.go - Speed ranking
task/download.go - CSV and console output
utils/csv.go
Runtime support
- Progress display
utils/progress.go
Other components
- CLI user
- IP ranges
ip.txt - CDN or website
Connections 15
- CLI user → CLI workflow: runs
README.md - CLI workflow → Probe coordinator: starts probes
main.go - Probe coordinator → IP range loader: loads candidates
task/tcping.go - IP range loader → IP ranges: reads ranges
task/ip.go - Probe coordinator → TCP probes: runs TCP probes
task/tcping.go - Probe coordinator → HTTP probes: dispatches HTTP
task/tcping.go - TCP probes → CDN or website: opens TCP connections
task/tcping.go - HTTP probes → CDN or website: sends HTTP requests
task/httping.go - CLI workflow → Latency and loss filters: filters results
main.go - CLI workflow → Download speed tests: tests download speed
main.go - Download speed tests → CDN or website: downloads test data
task/download.go - Download speed tests → Speed ranking: sorts by speed
task/download.go - CLI workflow → CSV and console output: exports and prints
main.go - Probe coordinator → Progress display: updates progress
task/tcping.go - Download speed tests → Progress display: updates progress
task/download.go