{"id":25637590,"url":"https://github.com/fyxme/dnsfaster","last_synced_at":"2026-07-10T11:32:07.300Z","repository":{"id":48078029,"uuid":"171997803","full_name":"fyxme/dnsfaster","owner":"fyxme","description":"Test the speed and reliability of a list of DNS servers","archived":false,"fork":false,"pushed_at":"2024-10-10T20:14:21.000Z","size":15842,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-28T22:40:53.202Z","etag":null,"topics":["benchmark","dns","efficiency","fast","go","golang","reliability","speed","testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fyxme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-02-22T05:04:41.000Z","updated_at":"2025-01-16T19:29:04.000Z","dependencies_parsed_at":"2025-10-28T22:34:29.794Z","dependency_job_id":"fcd31764-8f04-4607-80c4-42f5146094da","html_url":"https://github.com/fyxme/dnsfaster","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fyxme/dnsfaster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fyxme%2Fdnsfaster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fyxme%2Fdnsfaster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fyxme%2Fdnsfaster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fyxme%2Fdnsfaster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fyxme","download_url":"https://codeload.github.com/fyxme/dnsfaster/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fyxme%2Fdnsfaster/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35330738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-10T02:00:06.465Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","dns","efficiency","fast","go","golang","reliability","speed","testing"],"created_at":"2025-02-23T01:27:49.347Z","updated_at":"2026-07-10T11:32:07.292Z","avatar_url":"https://github.com/fyxme.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dnsfaster\n\ndnsfaster allows you to test the speed and reliability of different DNS servers to check which one is the fastest for your needs.\n\nFaster DNS servers can help improve the speed and reliability of tools used for querying large amounts of DNS records.\n\ndnsfaster was originally developped to find better and faster servers to use while dns bruteforcing.\n\nAdditionally, using the fastest dns server can help significantly increase your speed while browsing the internet.\n\n[Why should you test the dns servers you use?](https://gitlab.com/jules.rigaudie/dnsfaster#why-should-you-test-the-dns-servers-you-use)\n\n## dnsfaster in action\n\nSettings:\n\n```\n100 workers\n100 tests\ndomain: example.com\noutput file: out\ninput file: test-input/10.txt\n```\n\nfull command: `./dnsfaster -in=test-input/10.txt -workers=100 -tests=100 -domain=\"example.com\" -out=out`\n\n[![asciicast](https://asciinema.org/a/t40ORqxZz5KCB6YXOw8A7H8i9.svg)](https://asciinema.org/a/t40ORqxZz5KCB6YXOw8A7H8i9)\n\n## How does dnsfaster work?\n\ndnsfaster requests multiple random A records from the specified DNS servers.\nTo generate the random A record, it uses a valid domain and prepends an invalid subdomain.\n\n# Requirements\n\n- DNS library : `https://github.com/miekg/dns`\n\nTo install required library run:\n\n```\ngo get\n```\n\nTo build the binary:\n\n```\ngo build dnsfaster.go\n```\n\n# Usage\n\n```\n$ ./dnsfaster -h\nUsage of ./dnsfaster:\n  -domain string\n    \tDomain name to test against (default \"example.com\")\n  -in string\n    \tThe input filepath\n  -out string\n    \tThe output file\n  -test int\n    \tNumber of tests per dns server (default 100)\n  -workers int\n    \tNumber of workers (default 10)\n```\n\nLook at `run.sh` for an example command\n\n## Why should you test the dns servers you use?\n\n### Intro\n\nTo answer this question we compared efficiency and reliability of massdns (\"A high-performance DNS stub resolver for bulk lookups and reconnaissance (subdomain enumeration)\") using the best dns servers vs random dns servers.\n\nWe used [https://public-dns.info](https://public-dns.info) which has a usefull resources allowing us to get a text file of dns resolvers. ([link](https://public-dns.info/nameservers.txt). This file contained 13219 when we ran this test.\n\nWe then ran dnsfaster on that list and find the fastest and most reliable dns resolvers.\n\nWe used the following settings:\n\n- number of tests per resolver: 100\n- number of workers: 1000\n\nWe sorted the output based on average resolve time.\n\n### The resolvers we will be comparing\n\nThe top 10 resolvers recorded can be found here (this might differ depending on location):\n```\n% head fastest.txt -n 10\n156.154.70.35\n156.154.70.29\n64.20.42.252\n156.154.70.10\n204.246.1.36\n156.154.70.14\n156.154.70.18\n156.154.70.19\n216.165.128.161\n156.154.70.2\n```\n\n\nThe 10 random resolvers we will use for comparaison:\n```\n% shuf -n 10 fastest.txt\n65.78.52.18\n124.6.188.176\n41.217.204.165\n83.218.85.162\n213.248.45.60\n213.3.18.168\n78.111.224.224\n92.222.202.244\n92.247.8.252\n62.2.121.84\n```\n\nBefore testing the fastest resolvers vs random resolvers, we generate an input file of domains which do not exist in order to not bypass the cache. The script can be found under test notes.\n\n### Massdns outputs\n\n#### fastest resolvers\n\n```\n% ./tools/massdns/bin/massdns -r fastest-10.txt -t A -o S -w out in\n\nProgress: 100.00% (00 h 00 min 49 sec / 00 h 00 min 49 sec)\nCurrent incoming rate: 274 pps, average: 20946 pps\nCurrent success rate: 39 pps, average: 20281 pps\nFinished total: 1000000, success: 1000000 (100.00%)\nMismatched domains: 32783 (3.17%), IDs: 0 (0.00%)\nFailures: 0: 52.80%, 1: 25.72%, 2: 11.68%, 3: 5.24%, 4: 2.39%, 5: 1.14%, 6: 0.54%, 7: 0.24%, 8: 0.12%, 9: 0.06%, 10: 0.03%, 11: 0.02%, 12: 0.01%, 13: 0.00%, 14: 0.00%, 15: 0.00%, 16: 0.00%, 17: 0.00%, 18: 0.00%, 19: 0.00%, 20: 0.00%, 21: 0.00%, 22: 0.00% [...]\n```\n\n#### random resolvers\n\n```\n% ./tools/massdns/bin/massdns -r randoms-10.txt -t A -o S -w out in\n\nProcessed queries: 1000000\nReceived packets: 1452735\nProgress: 100.00% (00 h 02 min 17 sec / 00 h 02 min 17 sec)\nCurrent incoming rate: 2801 pps, average: 10654 pps\nCurrent success rate: 13 pps, average: 7333 pps\nFinished total: 1000000, success: 1000000 (100.00%)\nMismatched domains: 452735 (31.16%), IDs: 0 (0.00%)\nFailures: 0: 22.85%, 1: 24.89%, 2: 16.71%, 3: 11.93%, 4: 7.91%, 5: 5.29%, 6: 3.52%, 7: 2.36%, 8: 1.59%, 9: 1.05%, 10: 0.67%, 11: 0.45%, 12: 0.27%, 13: 0.18%, 14: 0.11%, 15: 0.08%, 16: 0.05%, 17: 0.03%, 18: 0.02%, 19: 0.01%, 20: 0.01%, 21: 0.00%, 22: 0.00% [...]\n```\n\n### Results\n\n#### Times\n\n- Random 10 resolvers: `137 seconds`\n- Fastest 10 resolvers: `49 seconds`\n\n137/49 = 2.7959183673 ~= 2.8\n\nThis means that massdns is 2.8 times faster when using the fastest DNS resolvers vs using randomly selected resolvers.\n\n#### First request error rate\n\n- Random: `Failures: 0: 22.85%, 1: 24.89%, 2: 16.71%, 3: 11.93% [...]`\n- Fastest: `Failures: 0: 52.80%, 1: 25.72%, 2: 11.68%, 3: 5.24% [...]`\n\nThe first requests was successfull 52.80% of the time using the fastest and most reliable resolvers while it was only successful 22.85% of the time when using random resolvers.\n\n#### Mismatched domains\n\n- Random: `Mismatched domains: 452735 (31.16%), IDs: 0 (0.00%)`\n- Fastest: `Mismatched domains: 32783 (3.17%), IDs: 0 (0.00%)`\n\n452735 / 32783 = 13.8100539914 ~= 13.8\n\nThe number of mismatched domains is 13.8 times greater when using non random resolvers.\n\n### Conclusion\n\nUsing the fastest and most reliable resolvers significantly increased the speed and efficiency of massdns. Hence, it is important to test your dns resolvers as it will increase the speed and reliability of your tools.\n\n### Additional test notes\n\n- Each test had 1,000,000 DNS queries\n- The list of dns queries was using randomly generated sudomain values in order to stop the local DNS server from caching the responses. To generate the subdomains we used the python script below:\n\n```python\nimport uuid\n\nbase_domain = \"fyx.me\"\n\nnumber_of_domains = int(1e6) # 1 million\n\nfor i in range(number_of_domains):\n    print(\"{}.{}\".format(uuid.uuid4().hex,base_domain))\n```\n\nand ran it as follows `python generate_domains.py \u003e domains.txt`\n\n- We picked random resolvers from the list of working dns resolvers by running `shuf -n N working-resolvers.txt \u003e resolvers.txt` where N is the number of resolvers requested\n- To get the best resolvers we used this command `head -n N working-resolvers.txt \u003e resolvers.txt` where N is the number of resolvers requested\n\n# Limitations\n\n- Does not work for ipv6 yet.\n- Will not work if you provide a test domain which responds to all subdomains (wildcard dns entry - \\*.domain.com)\n\n# TODO\n\n- add warning when test domain is a wildcard domain\n- implement ipv6\n- Add test success rate threshold flag (\u003e x%)\n- clean up codebase\n- silent mode\n- add tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffyxme%2Fdnsfaster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffyxme%2Fdnsfaster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffyxme%2Fdnsfaster/lists"}