Created
November 3, 2025 22:49
-
-
Save williamzujkowski/82e4d29a006b6fc5b20b881760d6deb9 to your computer and use it in GitHub Desktop.
DoH Monitoring Tools - Performance testing, DNS leak checks, and log analysis for DNS-over-HTTPS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # DoH Performance Monitoring Tools | |
| import time | |
| import dns.resolver | |
| import requests | |
| from statistics import mean, stdev | |
| # Test using curl | |
| # curl -H 'content-type: application/dns-message' \ | |
| # --data-binary @<(echo -n 'q80BAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB' | base64 -d) \ | |
| # https://cloudflare-dns.com/dns-query | hexdump -C | |
| # Test using dog (better than dig for DoH) | |
| # dog example.com @https://cloudflare-dns.com/dns-query | |
| # Check for DNS leaks | |
| # Visit: https://dnsleaktest.com | |
| # Should only show your configured DoH provider | |
| # Performance benchmarking | |
| # ... (additional implementation details) | |
| benchmark_dns(traditional_dns_query, test_domains, "Traditional DNS") | |
| benchmark_dns(doh_query, test_domains, "DNS-over-HTTPS") | |
| # Parse dnscrypt-proxy logs | |
| LOG_FILE="/var/log/dnscrypt-proxy/query.log" | |
| # ... (additional implementation details) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment