CloudflareSpeedTest is a CLI tool written in Go that measures latency and download speed of Cloudflare CDN IP addresses to find the fastest ones for users in China, where many Cloudflare IPs are suboptimal. It reads IP ranges from files (ip.txt/ipv6.txt) or command-line arguments, performs concurrent TCP or HTTP ping tests, filters results by latency/loss rate, then conducts HTTP download speed tests on the lowest-latency IPs. The final output is a sorted list of the best IPs displayed in the console and saved to a CSV file. The tool supports extensive customization: thread count, ping count, port, download test duration, speed/latency thresholds, colocation filtering via HTTP headers, and debug logging. It also includes helper scripts for automatically updating system hosts files, 3proxy configurations, or Cloudflare DNS records with the optimal IP. The architecture is a single binary with modular task files (tcping, httping, download, ip parsing) and utility modules (color output, CSV export, progress bar). External dependencies are minimal: ewma for moving average, pb for progress bars, and color for terminal colors. The codebase is well-structured with clear separation of concerns, though it lacks automated tests and CI pipelines. It is a practical, community-driven tool with over 29k stars, actively maintained with recent commits and responsive issue triage.
iperf3 is a mature, widely-deployed network bandwidth measurement tool developed by ESnet/LBNL. It measures maximum achievable throughput on IP networks using TCP, UDP, and SCTP, and provides detailed per-interval statistics including jitter, packet loss, retransmits, congestion window, and CPU utilization. The tool operates as a client-server application with a control channel for parameter exchange and data channels for bulk transfer, supporting parallel streams, reverse mode, bidirectional tests, and various pacing/affinity options. The codebase is written in C and built with GNU Autotools (autoconf, automake, libtool). It exposes a public library API (libiperf) that allows embedding iperf functionality into other programs, demonstrated by minimal examples in the examples/ directory. The architecture follows a protocol vtable pattern (struct protocol) for pluggable transport protocols, a callback system for test lifecycle events, and a timer subsystem for pacing and reporting intervals. JSON output is generated via a vendored cJSON library. Key strengths include its cross-platform support (Linux, FreeBSD, macOS, and others via #ifdef), extensive command-line options, and integration with perfSONAR for research and education networks. However, the codebase shows signs of organic growth: large monolithic files (iperf_api.c ~3000 lines), platform-specific #ifdef sprawl, manual release test scripts, and some unresolved TODOs. Security advisories have been issued for past vulnerabilities, and the authentication module uses OpenSSL RSA with multiple padding modes. Overall, iperf3 is a high-quality, production-grade tool with a few areas of technical debt.