A production-grade DNS leak detection tool built with Rust, providing comprehensive DNS leak testing capabilities with a RESTful API.
- Dynamic Domain Generation: Automatically generates unique test domains for each leak test
- Authoritative DNS Server: Built-in DNS server for true leak detection
- Comprehensive DNS Leak Detection: Tests multiple DNS resolvers to identify potential leaks
- Multi-resolver Testing: Supports testing against public DNS servers and custom resolvers
- IPv4/IPv6 Support: Dual-stack testing capabilities
- Real-time Analysis: Instant leak detection with severity assessment
- RESTful API: Easy integration with existing systems
- Prometheus Metrics: Built-in monitoring and observability
- Rate Limiting: Protection against abuse
- Production Ready: Docker support, health checks, graceful shutdown
# Build and run
cargo build --release
cargo run --release
# With custom configuration
cargo run --release -- --config /path/to/config.toml --port 8080# Build and run with Docker
docker build -t vpn9-dns-leak-tool .
docker run -p 8080:8080 -p 9090:9090 vpn9-dns-leak-tool
# Using Docker Compose
docker-compose up -d# Dynamic domain generation test
curl -X POST http://localhost:8080/api/v1/test \
-H "Content-Type: application/json" \
-d '{
"timeout_seconds": 30,
"enable_ipv6": true,
"custom_resolvers": ["8.8.8.8", "1.1.1.1"]
}'curl http://localhost:8080/api/v1/test/{test_id}curl http://localhost:8080/api/v1/healthcurl http://localhost:9090/metricsThe tool can be configured via:
- Configuration file (
config.toml) - Environment variables (prefix:
DNS_LEAK_) - Command-line arguments
See config.toml for all available options.
# Run unit tests
cargo test
# Run integration tests
cargo test --test integration_test
# Run benchmarks
cargo benchThis project is licensed under the GNU Affero General Public License v3.0 (AGPLv3).
See the LICENSE file for the full text.