DNS Tester is a command-line tool written in Go that benchmarks various DNS providers by measuring key performance metrics such as ping latency, jitter, DNS resolution time, and packet loss. It then computes a composite score based on these metrics and recommends the top-performing providers for fast and consistent DNS resolution.
- Comprehensive Metrics: Computes average, median, minimum, maximum, and jitter for both ping and DNS resolution.
- Packet Loss Detection: Measures packet loss to evaluate the reliability of each provider.
- Composite Scoring: Uses a weighted composite score to rank DNS providers.
- Cross-Platform: Works on Linux, macOS, and Windows.
- CI/CD Integration: Automatically builds and releases binaries via GitHub Actions.
- Go 1.24 or later
- The following commands must be available on your system:
ping
for latency testsdig
for DNS resolution tests
curl -L "https://raw.githubusercontent.com/hawshemi/dns-tester/main/dns-tester-run.sh" -o dns-tester-run.sh && chmod +x dns-tester-run.sh && bash dns-tester-run.sh
Windows: (Broken for now)
- Download from Releases.
- Open
CMD
orPowershell
in the directory. -
.\dns-tester.exe
Flags:
--output (-o): Output format (table, json, csv), default: table
--runs (-r): Number of test runs, default: 3
--help (-h): Show help
Examples:
./dns-tester
./dns-tester -o json -r 5
./dns-tester --output=csv --runs=2
wget "https://raw.githubusercontent.com/hawshemi/tools/main/go-installer/go-installer.sh" -O go-installer.sh && chmod +x go-installer.sh && bash go-installer.sh
git clone https://github.com/hawshemi/dns-tester.git
cd dns-tester
go mod init dns-tester && go mod tidy
CGO_ENABLED=0 go build