Version: 1.0.2
CT is a powerful, dual-purpose network diagnostic and optimization tool written in Go. It combines a high-performance DNS benchmark with a feature-rich proxy checker, delivering professional-grade network analysis in a single executable.
- All-in-One Solution — No need for separate DNS benchmarking and proxy checking tools
- Production-Ready — Battle-tested with thousands of DNS servers and proxies
- Cross-Platform — Windows, Linux, and macOS support with native system integration
- Performance-First — Concurrent architecture maximizes throughput while minimizing resource usage
- Multi-Domain Testing — Test against multiple domains simultaneously
- Complete Protocol Support — UDP, TCP, DNS-over-TLS (DoT), DNS-over-HTTPS (DoH)
- Comprehensive Validation — DNSSEC, EDNS, IPv6 support detection
- HTTP Verification — Validate DNS responses by checking HTTPS connectivity
- Geolocation — Country and ISP identification for each DNS server
- Scoring System — Intelligent scoring based on speed, reliability, and features
- Batch Processing — Test thousands of DNS servers with configurable concurrency
- Multi-Protocol Support — HTTP, HTTPS, SOCKS4, SOCKS5
- Authentication Support — Username/password authentication for all protocols
- Anonymity Detection — Identifies elite, anonymous, and transparent proxies
- Performance Metrics — Latency, speed classification, and comprehensive scoring
- GeoIP Integration — Country and provider identification
- Proxy Scraping — Download or scrape proxies from various sources
- IPv6 Support — Full IPv6 proxy detection and testing
- Automatic Configuration — Apply best DNS or proxy to your system with one command
- Cross-Platform System Settings — Native support for Windows, Linux, macOS
- Status Reporting — View current system DNS and proxy settings
go install github.com/batmanpriv/ct@1.0.2This will install the ct binary to your $GOPATH/bin directory.
# Clone the repository
git clone https://github.com/batmanpriv/ct.git
cd ct
# Build the binary
go build -o ct main.go
# Or install locally
go installDownload the latest release for your platform from the releases page.
# Test DNS servers from a file
ct -dns resolvers.txt
# Test with HTTP verification
ct -dns resolvers.txt -mode 1
# Test specific domains
ct -dns resolvers.txt -domains "google.com,github.com,cloudflare.com"
# Use more threads for faster testing
ct -dns resolvers.txt -t 50
# Score-based sorting (recommended)
ct -dns resolvers.txt -mode 1 -score
# Find and apply the best DNS server
ct -apply-best
# Check current DNS settings
ct -set status# Check proxies from a file
ct -proxy proxies.txt
# Specify proxy types to test
ct -proxy proxies.txt -proxy-types socks5
# Auto-detect proxy types (slower but more accurate)
ct -proxy proxies.txt -proxy-auto
# More threads for faster checking
ct -proxy proxies.txt -proxy-t 100
# Score-based sorting
ct -proxy proxies.txt -proxy-score
# Download fresh proxies
ct -proxy-dl
# Download specific proxy types
ct -proxy-dl -proxy-type socks5
# Scrape proxies from URL
ct -proxy-scrape https://example.com/proxies.txt
# Deep scraping (recursive)
ct -proxy-scrape-deep https://example.com/proxies.txt
# Find and apply the best proxy
ct -proxy-apply-best
# Check current proxy settings
ct -proxy-set status| Flag | Description | Default |
|---|---|---|
-dns |
Path to DNS server list file | - |
-t |
Number of concurrent threads | 10 |
-domains |
Comma-separated domains to test | cloudflare.com |
-url |
Single URL to test (overrides -domains) | - |
-mode |
Test mode: 0 (DNS only), 1 (DNS + HTTP) |
0 |
-json |
Export results in JSON format | false |
-score |
Sort by score instead of speed | false |
-no-color |
Disable colored output | false |
-set |
Set system DNS or check status | - |
-apply-best |
Find best DNS and apply to system | false |
-insecure |
Allow insecure TLS for DoT | false |
| Flag | Description | Default |
|---|---|---|
-proxy |
Path to proxy list file | - |
-proxy-t |
Number of concurrent threads | 50 |
-proxy-types |
Comma-separated proxy types to test | - |
-proxy-auto |
Auto-detect proxy type | true |
-proxy-dl |
Download proxies from public sources | false |
-proxy-type |
Proxy type to download (all, socks5, etc.) |
all |
-proxy-scrape |
Scrape proxies from URL | false |
-proxy-scrape-deep |
Deep recursive scraping | false |
-proxy-score |
Sort by score instead of speed | false |
-proxy-apply-best |
Find best proxy and apply to system | false |
-proxy-set |
Set system proxy or check status | - |
-proxy-url |
Test URL for proxy checking | https://telegram.org |
One DNS server per line. Supports:
# Comment lines start with #
1.1.1.1:53
8.8.8.8
[2001:4860:4860::8888]:53
9.9.9.9
One proxy per line. Supports various formats:
# HTTP/HTTPS proxies
http://user:pass@192.168.1.1:8080
https://192.168.1.2:443
# SOCKS proxies
socks5://user:pass@192.168.1.3:1080
socks4://192.168.1.4:1081
# Plain format (auto-detected)
192.168.1.5:8080
192.168.1.6:1080
DNS Benchmark - Testing 1000 servers
Progress: 100.0% (1000/1000) | Valid: 847
# DNS Lookup HTTPS Location Provider Score
-------------------------------------------------------------------------------------
#1 1.1.1.1 8ms 45ms US Cloudflare 95
#2 8.8.8.8 12ms 52ms US Google 92
#3 9.9.9.9 15ms 58ms US Quad9 88
#4 94.140.14.14 22ms 65ms NL AdGuard 85
#5 208.67.222.222 25ms 70ms US Cisco 82
========================================
Total DNS Tested: 847
Valid DNS (Lookup OK): 847
HTTPS OK: 813
Average Score: 67/100
Fastest DNS: 1.1.1.1 (8ms)
Highest Score: 1.1.1.1 (95/100)
========================================
========================================
RECOMMENDED DNS CONFIGURATION
========================================
Primary: 1.1.1.1
Secondary: 8.8.8.8
Reason:
• Latency: 8ms (Excellent)
• HTTPS: 45ms
• DNSSEC: true
• DoH: true
• IPv6: true
• Score: 95/100
Proxy Checker - Testing 5000 proxies
Progress: 100.0% (5000/5000) | Working: 234
# Proxy Type Latency Country Anonymity Speed Score IPv6 Auth
----------------------------------------------------------------------------------------------------
#1 socks5://1.2.3.4 socks5 45ms US elite fast 85 ✅ ❌
#2 https://5.6.7.8 https 52ms DE anonymous fast 78 ❌ ✅
#3 http://9.10.11.12 http 65ms GB transparent medium 62 ❌ ❌
#4 socks4://13.14.15.16 socks4 78ms CA elite medium 58 ❌ ❌
#5 socks5://17.18.19.20 socks5 95ms AU anonymous slow 45 ✅ ✅
========================================
Total Proxies in File: 5000
Working Proxies: 234
Success Rate: 4.7%
Average Latency: 67ms
Average Score: 61/100
Best Proxy: socks5://1.2.3.4 (45ms)
========================================
========================================
RECOMMENDED PROXY CONFIGURATION
========================================
Primary: socks5://1.2.3.4
Reason:
• Type: socks5
• Latency: 45ms
• Anonymity: elite
• Speed: fast
• IPv6: true
• Auth: false
• Score: 85/100
========================================
Mode 1 performs HTTP verification using the resolved IP:
ct -dns resolvers.txt -mode 1 -domains "google.com,github.com"This validates that the DNS server provides correct IP resolution by:
- Performing DNS lookup for the domain
- Establishing HTTPS connection to the resolved IP
- Verifying TLS certificate and HTTP response
The scoring algorithm evaluates:
DNS Component (40 points max):
- Successful resolution: 20 points
- Speed tiers: <10ms (+15), <50ms (+10), <100ms (+5)
HTTP Component (35 points max):
- HTTPS support: 20 points
- Speed tiers: <50ms (+15), <200ms (+10), <500ms (+5)
Features (25 points max):
- DNSSEC: 10 points
- EDNS: 5 points
- IPv6: 5 points
- UDP & TCP support: 5 points
- DoT/DoH: 5 points
- Additional record types: 2 points each
Apply the best DNS server automatically:
# Windows (requires Administrator)
ct -apply-best
# Linux
sudo ct -apply-best
# macOS
sudo ct -apply-bestThe tool automatically detects your OS and applies the recommended settings using:
- Windows:
netsh+ PowerShell - Linux:
systemd-resolvedor/etc/resolv.conf - macOS:
networksetup
-
DNS Testing: Use
-tflag (default: 10)- Higher threads reduce total testing time
- Recommended: 50-100 for large DNS lists
-
Proxy Testing: Use
-proxy-tflag (default: 50)- Higher threads significantly speed up testing
- Recommended: 100-200 for thousands of proxies
- Results are stored in memory during testing
- For very large lists (>50,000 items), consider:
- Using the
-jsonflag to save results incrementally - Filtering input lists before testing
- Using the
- Ensure stable network connection during testing
- DNS-over-HTTPS and DoT require proper TLS configuration
- Use
-insecureflag for testing with self-signed certificates
"Error opening file: The system cannot find the file specified"
- Verify the file path is correct
- Use absolute paths or proper relative paths
"No valid proxies found"
- Check proxy format in the input file
- Ensure proxies are accessible from your network
- Increase timeout with proxy-specific flags
"Failed to set DNS/Proxy (Permission denied)"
- Run with administrator/root privileges
- On Windows: Right-click → Run as Administrator
- On Linux/macOS: Use
sudo
Slow testing performance
- Increase thread count with
-tor-proxy-t - Reduce timeout values
- Test smaller batches
The tool automatically handles:
- Missing port (defaults to 53)
- IPv6 addresses with and without brackets
- Comments starting with
# - Whitespace and special characters
ct/
├── main.go # Main entry point with DNS benchmark
├── go.mod # Go module definition
├── go.sum # Dependency checksums
├── resolvers.txt # DNS server list (7,886 servers)
└── pc/
└── proxy-checker.go # Proxy checker module
golang.org/x/net/proxy— SOCKS proxy supportgithub.com/miekg/dns— DNS protocol implementation
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
# Clone and enter directory
git clone https://github.com/batmanpriv/ct.git
cd ct
# Install dependencies
go mod download
# Run tests
go test ./...
# Build
go build -o ct main.goMIT License — See LICENSE file for details.
- DNS protocol support by miekg/dns
- Proxy support by golang.org/x/net
- Public proxy and DNS lists from various open-source projects
- Issues: GitHub Issues
- Discussions: GitHub Discussions
CT — The Complete Network Testing Tool