{"id":17663842,"url":"https://github.com/marksmurphy/distributed-dig","last_synced_at":"2025-07-31T06:03:50.394Z","repository":{"id":35116486,"uuid":"208773565","full_name":"markSmurphy/distributed-dig","owner":"markSmurphy","description":"A utility which makes DNS lookup requests across multiple DNS resolvers and collates the results.","archived":false,"fork":false,"pushed_at":"2023-06-05T18:09:45.000Z","size":10540,"stargazers_count":2,"open_issues_count":8,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T23:09:16.144Z","etag":null,"topics":["address","cli","ddig","distributed","dns","domain","edns","fqdn","ip","lookup","resolution","resolve","resolver","utility"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/distributed-dig","language":"JavaScript","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/markSmurphy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2019-09-16T10:33:51.000Z","updated_at":"2023-01-23T07:51:25.000Z","dependencies_parsed_at":"2024-10-30T22:36:03.127Z","dependency_job_id":null,"html_url":"https://github.com/markSmurphy/distributed-dig","commit_stats":{"total_commits":183,"total_committers":2,"mean_commits":91.5,"dds":0.1311475409836066,"last_synced_commit":"7baeebd56ab6d71c26e854b1db81e361d673e874"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markSmurphy%2Fdistributed-dig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markSmurphy%2Fdistributed-dig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markSmurphy%2Fdistributed-dig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markSmurphy%2Fdistributed-dig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markSmurphy","download_url":"https://codeload.github.com/markSmurphy/distributed-dig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252968120,"owners_count":21833252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["address","cli","ddig","distributed","dns","domain","edns","fqdn","ip","lookup","resolution","resolve","resolver","utility"],"created_at":"2024-10-23T19:42:42.446Z","updated_at":"2025-05-07T23:09:23.655Z","avatar_url":"https://github.com/markSmurphy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# distributed-dig\n\n![Version](https://img.shields.io/npm/v/distributed-dig.svg?style=plastic)\n![node-current](https://img.shields.io/node/v/distributed-dig?style=plastic)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/8ce535bbf396424ea774eaaa67effc47)](https://www.codacy.com/gh/markSmurphy/distributed-dig/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=markSmurphy/distributed-dig\u0026amp;utm_campaign=Badge_Grade)\n![GitHub issues](https://img.shields.io/github/issues/markSmurphy/distributed-dig?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/markSmurphy/distributed-dig?style=plastic)\n[![Known Vulnerabilities](https://snyk.io/test/npm/distributed-dig/badge.svg)](https://snyk.io/test/npm/distributed-dig)\n![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/distributed-dig.svg?style=plastic)\n![Downloads](https://img.shields.io/npm/dm/distributed-dig.svg?style=plastic)\n![Licence](https://img.shields.io/npm/l/distributed-dig.svg?style=plastic)\n\n## Quick Start\n\n### Installation\n\n**Install globally**:\n\n```text\nnpm install -g distributed-dig\n```\n\n### Usage\n\n**Lookup a single domain**:\n\n```text\nddig domain\n```\n\n![`ddig [domain]`](https://marksmurphy.github.io/img/ddig.single.domains.gif)\n\n---\n\n## Overview\n\nA utility which makes DNS lookup requests across multiple DNS resolvers and collates the results.\n\nUseful for checking if a DNS record has been fully propagated, or for querying the origins behind an [AWS Route 53](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-types.html) / [Azure Traffic Manager](https://azure.microsoft.com/en-gb/services/traffic-manager/) record (*or any other DNS-based load balancing solution*).\n\n---\n\n## Installation\n\nInstalling globally is recommended:\n\n```text\nnpm install -g distributed-dig\n```\n\n---\n\n## Usage\n\n```text\nddig domain [domain [domain] ...] [options]\n```\n\n---\n\n## Options\n\nThe following options are available:\n\n```text\n--port \u003cnumber\u003e                  Specify the DNS port [53]\n--protocol \u003cupd|tcp\u003e             Specify the DNS protocol [udp]\n--timeout \u003cnumber\u003e               Specify the DNS timeout in milliseconds [2500]\n--edns \u003ctrue|false\u003e              Enable or disable EDNS(0) [false]\n--config \u003cfilename\u003e              Specify an alternative configuration file\n--list-resolvers                 List resolvers configured in config file\n--list-options                   List DNS request options configured in config file\n--list-defaults                  Print json of default config file settings\n--verbose                        Outputs more information\n--no-color                       Switches off colour output\n--version                        Display version number\n--help                           Display this help\n```\n\n### port\n\nSpecify the TCP/UDP port tro use when connecting to the DNS resolver.\nDefault: `53`\n\n### protocol\n\nSpecify whether to use UDP or TCP when connecting to the DNS resolver.\nDefault: `udp`\n\n### timeout\n\nSpecifies the timeout in milliseconds to wait for a response from each DNS resolver.\nDefault: `2500` (*2.5 seconds*)\n\n### edns\n\nEnables [EDNS(0)](https://en.wikipedia.org/wiki/Extension_mechanisms_for_DNS)\nDefault: `false` (*disabled*)\n\nWith EDNS(0) enabled, if an upstream resolver doesn't support it then the standard DNS will be used as a fallback.\n*Even though EDNS is support by ~90% of resolvers on the internet [^1], it is disabled by default in `ddig` as it may cause the resolver to return the IP address it considers closest to you, which is counter-productive to the purpose of querying many geographically distributed DNS resolvers.*\n\n[^1]: [Internet Systems Consortium - Partial EDNS Compliance Hampers Deployment of New DNS Features](https://www.isc.org/blogs/partial-edns-compliance-hampers-deployment-of-new-dns-features/)\n\n### config\n\nSpecifies an alternative configuration file.\n\nTo create a custom config you can:\n\n1. pipe **--list-defaults** to a new file: `ddig --list-defaults \u003e custom.json`\n2. Edit `custom.json`\n3. Use the new configuration file: `ddig --config [path]custom.json example.com`\n\n### list-resolvers\n\nLists the resolvers configured in the `distributed-dig.json` config file:\n\n![ddig --list-resolvers](https://marksmurphy.github.io/img/ddig.list-resolvers.gif)\n\n### list-options\n\nLists the options configured in the `distributed-dig.json` config file:\n\n![ddig --list-options](https://marksmurphy.github.io/img/ddig.list-options.gif)\n\n### list-defaults\n\nPrints out a sample default config file in raw json.  Pipe it to a file for an initial customised configuration file.\n\n### verbose\n\nSwitches on verbose mode which outputs the following additional fields:\n\n* Full recursive answer (i.e. nested `cname` records)\n* Resolver IP Address\n* Response time\n\n![ddig www.asos.com --verbose](https://marksmurphy.github.io/img/ddig.single.domain.www.asos.com.verbose.gif)\n\n`--verbose` also modifies the `--list-resolvers` and `--list-options` switches.\n\n### no-color\n\nIf your terminal has problems rendering the colour output then you can switch it off by using `--no-color`.\n\n### version\n\nPrints out `distributed-dig`'s version number.\n\n### help\n\nDisplays the help screen:\n\n![`ddig --help`](https://marksmurphy.github.io/img/ddig.help.gif)\n\n---\n\n## Examples\n\n### Lookup a single domain\n\n* List the IP address returned for `www.asos.com` from each of the configured resolver:\n\n```text\nddig www.asos.com\n```\n\n![ddig www.asos.com](https://marksmurphy.github.io/img/ddig.example.01.png)\n\n### Lookup a single domain with verbose enabled\n\n* List the IP address and full recursive path returned for `www.asos.com` from each of the configured resolver:\n\n```text\nddig www.asos.com --verbose\n```\n\n![ddig www.asos.com --verbose](https://marksmurphy.github.io/img/ddig.example.02.png)\n\n### Lookup multiple domains with an increased timeout\n\n* List the IP addresses returned for both `www.asos.com` \u0026 `secure.asos.com` from each of the configured resolver with a 5 second timeout:\n\n```text\nddig www.asos.com my.asos.com secure.asos.com --timeout 5000\n```\n\n![ddig www.asos.com my.asos.com secure.asos.com](https://marksmurphy.github.io/img/ddig.example.03.png)\n\n---\n\n## Features\n\n### Lookup a domain from a URL\n\nAs of version `1.8.0` you can provide a URL and the domain will be extracted. This is handy when performing a copy/paste from a browser's address bar.\n\n```text\nddig https://example.com\n```\n\n![`ddig [URL]`](https://marksmurphy.github.io/img/ddig.single.url.gif)\n\n### Unique IP Address Identifier\n\nThe first occurrence of each unique IP address is marked by a bullet point:\n\n![ddig unique IP Address Identifier](https://marksmurphy.github.io/img/ddig.unique.png)\n\n#### Unicode Support detection for Unique Address Identifier character\n\nThe bullet point character used is `U+2022 • BULLET (HTML \u0026#8226;)`.  If it is detected that the output is being piped (to a file or to `more` | `cat`) then the ascii character `42 * Asterisk (HTML \u0026ast;)`\n\n#### Filtering out just unique addresses\n\nAs of version `1.7.0` there is an option to provide a `--unique` switch which lists only the first occurrence of each distinct IP address returned. N.B. *It will not filter out errors*\n\n![`ddig [domain] --unique`](https://marksmurphy.github.io/img/ddig.single.domain.unique.gif)\n\n### Column Width Warning\n\nIf you use the `--verbose` switch and have a terminal window that's narrower than 130 columns you'll see a warning:\n\n![ddig column width warning](https://marksmurphy.github.io/img/ddig.width.warning.png)\n\n---\n\n## Configuration File\n\nAll Options and Resolvers are configured in `distributed-dig.json` file.  This file can exist in any of the following locations:\n\n* The current working directory - `node -p process.cwd()`\n* The home directory - `node -p require('os').homedir()`\n* The application's root directory (i.e. the same directory as `distributed-dig.js`)\n\n### Request Options\n\nThe default options are:\n\n```json\n\"options\": {\n    \"request\": {\n      \"port\": 53,\n      \"type\": \"udp\",\n      \"timeout\": 2500,\n      \"try_edns\": false,\n      \"cache\": false\n    },\n    \"question\": {\n      \"type\": \"A\"\n    }\n}\n```\n\n### DNS Resolvers\n\nResolvers are configured in an array with each resolver having a `nameServer` element which should be the IPv4 or IPv6 address, and a `provider` element which is just a free-form text label:\n\n```json\n\"resolvers\": [\n    {\n      \"nameServer\": \"208.67.222.222\",\n      \"provider\": \"OpenDNS (Primary)\"\n    },\n    {\n      \"nameServer\": \"208.67.220.220\",\n      \"provider\": \"OpenDNS (Secondary)\"\n    },\n    {\n      \"nameServer\": \"217.199.173.113\",\n      \"provider\": \"United Kingdom\"\n    }\n]\n```\n\nYou can find a list of public DNS servers [here](https://public-dns.info/) and [here](https://dnspropagation.net/free-public-dns-servers/), and tailor the configured list for your own requirements.\n\n---\n\n## Debugging\n\n`distributed-dig` uses the npm package [debug](https://www.npmjs.com/package/debug \"www.npmjs.com\").  If you set the environment variable `debug` to `ddig` you'll see full debug output.\n\n### Windows\n\n```text\nset debug=ddig\n```\n\n### Linux\n\n```text\nDEBUG=ddig\n```\n\n### Powershell\n\n```text\n$env:debug=\"ddig\"\n```\n\n---\n\n## FAQ\n\n* [Where is the Change Log?](#where-is-the-change-log)\n* [What terminal/console are you using in the screen shots?](#what-terminal-are-you-using)\n\n### Where is the Change Log\n\nThe `CHANGELOG.md` can be found [here](./CHANGELOG.md)\n\n---\n\n### What terminal are you using\n\nI'm using Microsoft's new tabbed [Windows Terminal](https://github.com/microsoft/terminal) which has many excellent features, and the ability to [configure a background image](https://www.howtogeek.com/426346/how-to-customize-the-new-windows-terminal-app/).\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarksmurphy%2Fdistributed-dig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarksmurphy%2Fdistributed-dig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarksmurphy%2Fdistributed-dig/lists"}