{"id":13466773,"url":"https://github.com/MattIPv4/DNS-over-Discord","last_synced_at":"2025-03-26T00:31:28.411Z","repository":{"id":37029736,"uuid":"202993623","full_name":"MattIPv4/DNS-over-Discord","owner":"MattIPv4","description":"1.1.1.1 works from a Discord server, thanks to the 1.1.1.1 bot. Invite the bot to your Discord server to start using DNS over Discord.","archived":false,"fork":false,"pushed_at":"2024-12-05T22:41:19.000Z","size":4083,"stargazers_count":295,"open_issues_count":3,"forks_count":32,"subscribers_count":4,"default_branch":"v2","last_synced_at":"2025-03-20T06:09:59.057Z","etag":null,"topics":["cloudflare","cloudflare-dns","cloudflare-dns-api","cloudflare-worker","cloudflare-workers","discord","discord-api","discord-bot","discord-interactions","discord-message-components","discord-slash-commands","dns","dns-over-https","doh","doh-json","hacktoberfest","javascript"],"latest_commit_sha":null,"homepage":"https://dns-over-discord.v4.wtf/invite","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MattIPv4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"MattIPv4","patreon":"IPv4","ko_fi":"MattIPv4","custom":"https://paypal.me/MattIPv4Cowley"}},"created_at":"2019-08-18T11:18:42.000Z","updated_at":"2025-03-16T08:21:25.000Z","dependencies_parsed_at":"2023-02-09T09:01:09.232Z","dependency_job_id":"3124e62e-f973-44a9-83c0-4adaef9b8653","html_url":"https://github.com/MattIPv4/DNS-over-Discord","commit_stats":{"total_commits":108,"total_committers":5,"mean_commits":21.6,"dds":"0.19444444444444442","last_synced_commit":"73458aa2053c5941685f63e973cb4ce481c9a5db"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":"MattIPv4/template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2FDNS-over-Discord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2FDNS-over-Discord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2FDNS-over-Discord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2FDNS-over-Discord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MattIPv4","download_url":"https://codeload.github.com/MattIPv4/DNS-over-Discord/tar.gz/refs/heads/v2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245566098,"owners_count":20636390,"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":["cloudflare","cloudflare-dns","cloudflare-dns-api","cloudflare-worker","cloudflare-workers","discord","discord-api","discord-bot","discord-interactions","discord-message-components","discord-slash-commands","dns","dns-over-https","doh","doh-json","hacktoberfest","javascript"],"created_at":"2024-07-31T15:00:49.871Z","updated_at":"2025-03-26T00:31:27.377Z","avatar_url":"https://github.com/MattIPv4.png","language":"JavaScript","funding_links":["https://github.com/sponsors/MattIPv4","https://patreon.com/IPv4","https://ko-fi.com/MattIPv4","https://paypal.me/MattIPv4Cowley"],"categories":["JavaScript"],"sub_categories":[],"readme":"# DNS over Discord\n\n**A 1.1.1.1 DNS resolver built for Discord**\n\n*This documentation is also available on [Cloudflare's developer documentation site](https://developers.cloudflare.com/1.1.1.1/other-ways-to-use-1.1.1.1/dns-over-discord)*\n\n---\n\n1.1.1.1 works from a Discord server, thanks to the 1.1.1.1 bot. [Invite the bot to your Discord server](https://dns-over-discord.v4.wtf/invite) to start using DNS over Discord. Or, [add the bot to your Discord account](https://dns-over-discord.v4.wtf/invite/user) to use it anywhere in Discord.\n\n## Perform DNS lookups\n\nOnce the bot is in your server, type `/dig` to start performing DNS lookups. This will provide a native interface within Discord that allows you to specify the domain to lookup, an optional DNS record type and an optional flag for a short result.\n\nIf only a domain is given for the command, the bot will default to looking for `A` DNS records, and will return the full format result, not the short form.\n\nExample:\n\n```txt\n/dig domain: cloudflare.com\n```\n\n### Supported record types\n\nDiscord has a limit of 25 options in slash commands, so DNS over Discord offers the 25 most common DNS record types to choose from.\n\n\u003cdetails\u003e\n\u003csummary\u003eSupported DNS record types\u003c/summary\u003e\n\u003cdiv\u003e\n\n* `A`\n* `AAAA`\n* `CAA`\n* `CDNSKEY`\n* `CDS`\n* `CERT`\n* `CNAME`\n* `DNSKEY`\n* `DS`\n* `HINFO`\n* `HTTPS`\n* `LOC`\n* `MX`\n* `NAPTR`\n* `NS`\n* `PTR`\n* `SMIMEA`\n* `SOA`\n* `SPF`\n* `SRV`\n* `SSHFP`\n* `SVCB`\n* `TLSA`\n* `TXT`\n* `URI`\n\n\u003c/div\u003e\n\u003c/details\u003e\n\nTo query other DNS record types, or multiple record types at once, use the `/multi-dig` command.\n\n### Short form response\n\nDNS over Discord has an optional flag in the `/dig` command that allows the user to request a response in the short form.\n\nWhen you request a response in the short form, the name and TTL columns will be excluded. The command only returns the data column without formatting, similar to the equivalent `dig` command-line interface response.\n\nExample:\n\n```txt\n/dig domain: cloudflare.com type: AAAA records short: True\n```\n\n### Disable DNSSEC checking\n\nYou can disable DNSSEC checking in the `dig` command by passing `cdflag` as true. This will get the records even if validation fails.\n\nExample:\n\n```txt\n/dig domain: cloudflare.com type: AAAA records cdflag: True\n```\n\n### Refreshing existing results\n\nYou can refresh the DNS lookup results by clicking the Refresh button. Clicking it will trigger the bot to re-request the DNS query in the message, and update the results in the message. Any user can click this button.\n\nThe refresh button is available on all responses to the `/dig` command, including those that resulted in an error, such as an unknown domain or no records found.\n\n\u003cdiv class=\"medium-img\"\u003e\n\n![Refreshing dig domain: cloudflare.com](assets/commands/dig-command-refresh.gif)\n\n\u003c/div\u003e\n\n### Changing DNS provider\n\nBy default, the DNS over Discord bot uses Cloudflare's 1.1.1.1 DNS service. You can run the DNS lookup with alternate DNS providers by selecting the dropdown below the result. This shows you a list of available providers. Selecting a new provider updates the results in the message. Any user can change the DNS provider.\n\n\u003cdetails\u003e\n\u003csummary\u003eSupported DNS providers\u003c/summary\u003e\n\u003cdiv\u003e\n\n* [1.1.1.1 (Cloudflare)](https://developers.cloudflare.com/1.1.1.1/)\n* [1.1.1.2 (Cloudflare Malware Blocking)](https://developers.cloudflare.com/1.1.1.1/setup/#1111-for-families)\n* [1.1.1.3 (Cloudflare Malware + Adult Content Blocking)](https://developers.cloudflare.com/1.1.1.1/setup/#1111-for-families)\n* [8.8.8.8 (Google)](https://developers.google.com/speed/public-dns)\n* [9.9.9.9 (Quad9)](https://www.quad9.net/)\n\n\u003c/div\u003e\n\u003c/details\u003e\n\n\u003cdiv class=\"medium-img\"\u003e\n\n![Changing DNS provider (1.1.1.1 -\u003e 8.8.8.8) for dig domain: cloudflare.com](assets/commands/dig-command-provider.gif)\n\n\u003c/div\u003e\n\n## `multi-dig` command\n\nIf you want to look up multiple DNS record types at once, use the `/multi-dig` command. This allows you to specify any supported DNS record type, and multiple types separated by a space.\n\nExample:\n\n```txt\n/multi-dig domain: cloudflare.com types: A AAAA\n```\n\n### Supported record types\n\nWhen providing DNS record types for the `/multi-dig` command, Discord will not prompt you with options. You have to provide a space-separated list of valid DNS record types to lookup, as any invalid options will be silently dropped. `A` records will be used as the default if no valid types are given.\n\n\u003cdetails\u003e\n\u003csummary\u003eDNS record types supported and considered valid by the bot\u003c/summary\u003e\n\u003cdiv\u003e\n\nUse a `*` (asterisk) in place of a record type to get DNS results for all supported types.\n\n* `A`\n* `AAAA`\n* `AFSDB`\n* `APL`\n* `CAA`\n* `CDNSKEY`\n* `CDS`\n* `CERT`\n* `CNAME`\n* `CSYNC`\n* `DHCID`\n* `DLV`\n* `DNAME`\n* `DNSKEY`\n* `DS`\n* `EUI48`\n* `EUI64`\n* `HINFO`\n* `HIP`\n* `HTTPS`\n* `IPSECKEY`\n* `KEY`\n* `KX`\n* `LOC`\n* `MX`\n* `NAPTR`\n* `NS`\n* `NSEC`\n* `NSEC3`\n* `NSEC3PARAM`\n* `OPENPGPKEY`\n* `PTR`\n* `RP`\n* `SMIMEA`\n* `SOA`\n* `SPF`\n* `SRV`\n* `SSHFP`\n* `SVCB`\n* `TA`\n* `TKEY`\n* `TLSA`\n* `TXT`\n* `URI`\n* `ZONEMD`\n\n\u003c/div\u003e\n\u003c/details\u003e\n\n### Short form response\n\nLike the main `/dig` command, the `/multi-dig` command also supports the optional short flag after the types have been specified in the slash command.\n\nExample:\n\n```txt\n/multi-dig domain: cloudflare.com types: CDS CDNSKEY short: True\n```\n\n### Disable DNSSEC checking\n\nExactly like `dig` command, you can disable dns checking by passing `cdflag` as true. This will get the records even if validation fails.\n\nExample:\n\n```txt\n/multi-dig domain: cloudflare.com type: AAAA records cdflag: True\n```\n\n### Refreshing existing results\n\nThe `/multi-dig` command also provides a refresh button below each set of DNS results requested (or after each block of 10 DNS record types, if you requested more than 10).\n\nAs with the `/dig` command, any user can press the refresh button to refresh the displayed DNS results, including for DNS queries that had previously failed.\n\n\u003cdiv class=\"medium-img\"\u003e\n\n![Refreshing multi-dig domain: cloudflare.com types: A AAAA](assets/commands/multi-dig-command-refresh.gif)\n\n\u003c/div\u003e\n\n### Changing DNS provider\n\nLike the `/dig` command, you can change the DNS provider when using the `/multi-dig` command. The menu appears after each set of DNS results (or after each block of results if more than 10 record types are requested).\n\nThis menu can be used be any user to change the DNS provider used for the lookup.\n\n\u003cdetails\u003e\n\u003csummary\u003eSupported DNS providers\u003c/summary\u003e\n\u003cdiv\u003e\n\n* [1.1.1.1 (Cloudflare)](https://developers.cloudflare.com/1.1.1.1/)\n* [1.1.1.2 (Cloudflare Malware Blocking)](https://developers.cloudflare.com/1.1.1.1/setup/#1111-for-families)\n* [1.1.1.3 (Cloudflare Malware + Adult Content Blocking)](https://developers.cloudflare.com/1.1.1.1/setup/#1111-for-families)\n* [8.8.8.8 (Google)](https://developers.google.com/speed/public-dns)\n* [9.9.9.9 (Quad9)](https://www.quad9.net/)\n\n\u003c/div\u003e\n\u003c/details\u003e\n\n\u003cdiv class=\"medium-img\"\u003e\n\n![Changing DNS provider (1.1.1.1 -\u003e 8.8.8.8) for multi-dig domain: cloudflare.com types: A AAAA](assets/commands/multi-dig-command-provider.gif)\n\n\u003c/div\u003e\n\n## `whois` command\n\nThe `/whois` command allows you to perform a RDAP/WHOIS lookup right in Discord for a given domain, IP or ASN.\n\nExamples:\n\n```txt\n/whois query: cloudflare.com\n/whois query: 104.16.132.229\n/whois query: 2606:4700::6810:84e5\n/whois query: 13335\n```\n\n## Other commands\n\nThe bot also has a set of helper commands available to get more information about the bot and quick links.\n\n### `help` command\n\nThe `/help` command provides in-Discord documentation about all the commands available in the 1.1.1.1 DNS over Discord bot.\n\nExample:\n\n```txt\n/help\n```\n\n### `privacy` command\n\nThe `/privacy` command displays the Privacy Policy notice for using the 1.1.1.1 DNS over Discord bot. You can also [refer to the Privacy Policy page](https://dns-over-discord.v4.wtf/privacy) to access it.\n\nExample:\n\n```txt\n/privacy\n```\n\n### `terms` command\n\nThe `/terms` command displays the Terms of Service notice for using the 1.1.1.1 DNS over Discord bot. You can also [refer to the Terms of Service page](https://dns-over-discord.v4.wtf/terms) to access it.\n\nExample:\n\n```txt\n/terms\n```\n\n### `github` command\n\nThe DNS over Discord bot is open-source, and the `/github` command provides a quick link to access the GitHub repository. The GitHub repository can be accessed at [https://github.com/MattIPv4/DNS-over-Discord/](https://github.com/MattIPv4/DNS-over-Discord/).\n\nExample:\n\n```txt\n/github\n```\n\n### `invite` command\n\nThe `/invite` command provides the user with a quick link to invite the 1.1.1.1 DNS over Discord bot to another Discord server, or to add it to a Discord account.\nThe bot can be invited at any time with [https://dns-over-discord.v4.wtf/invite](https://dns-over-discord.v4.wtf/invite).\nThe bot can also be added to accounts with [https://dns-over-discord.v4.wtf/invite/user](https://dns-over-discord.v4.wtf/invite/user).\n\n```txt\n/invite\n```\n\n\u003c!--\n# When in Cloudflare docs:\n\n- Use `https://cfl.re/3nM6VfQ` instead of `https://dns-over-discord.v4.wtf/invite`\n- Remove all images\n- Remove alternate DNS provider details\n- Include development foot note as below:\n\n```txt\n---\n\n## Development\n\nThe DNS over Discord bot is deployed on [Cloudflare Workers](https://workers.cloudflare.com/).\n\nYou can find the source code for the bot on GitHub, as well as information on getting started with contributing to the project, at [https://github.com/MattIPv4/DNS-over-Discord/](https://github.com/MattIPv4/DNS-over-Discord/).\n```\n\n# Generating the types lists:\n\n```txt\nnode\n\n\u003e const { VALID_TYPES } = await import('./src/utils/dns.js');\n\u003e console.log(VALID_TYPES.slice(0, 25).map(type =\u003e `* \\`${type}\\``).join('\\n'));\n\u003e console.log(VALID_TYPES.map(type =\u003e `* \\`${type}\\``).join('\\n'));\n```\n\n# Generating the providers lists:\n\n```txt\nnode\n\n\u003e const { default: providers } = await import('./src/utils/providers.js');\n\u003e console.log(providers.map(({ name, info }) =\u003e `* [${name}](${info})`).join('\\n'));\n```\n--\u003e\n\n---\n\n## Development\n\n1. Create your test Discord application at https://discord.com/developers/applications (this does not need a bot account, just the application).\n2. Create your `development.env` file.\n   - Copy `development.env.sample` and fill out the information from your Discord application, plus the ID of your test server/guild.\n   - A Sentry DSN is required, but the token/org/project can be set to empty if source map uploads are not required.\n3. Authenticate with Wrangler by running `npx wrangler login`.\n4. Update `wrangler.toml` for your account.\n   - Use `npx wrangler whoami` to get your account ID, update the value in `wrangler.toml` to match.\n   - Use `npx wrangler kv:namespace create \"CACHE\"` to create the KV namespace, update the `id` and `preview_id` in `wrangler.toml` to match.\n5. Develop with the worker by running `npm run dev`.\n6. (Optional) Start an HTTP tunnel to your local development server by running `npm run tunnel`, using [cloudflared](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/run-tunnel/trycloudflare).\n\n### User-installed commands\n\nTo test the user-installed commands functionality, you'll need to make sure your Discord application has the User Install option enabled.\n\nYou'll then need to make sure that the `TEST_GUILD_ID` in `development.env` is commented out, as user-installed commands need to be registered globally.\n\nAfter that, start the worker as usual with `npm run dev`, install the application to your Discord user, and test the commands.\n\nIf you no longer wish to have the commands registered globally, leave `TEST_GUILD_ID` commented and update `webpack.config.js` to pass an empty array to the `registerCommands` call, then start the worker again to remove the global commands.\n\n## Deployments\n\n`wrangler.toml` and this repository is currently designed for a staging deployment and a production deployment.\n\nEnsure that you've created and configured `staging.env` and `production.env` appropriately (`staging.env` has a test server/guild by default, but this can be removed to stage global commands).\n\nEnsure that the staging/production environments in `wrangler.toml` have been updated with your zone IDs and routes for the workers.\n\nEnsure that the KV namespaces are created for staging/production environments and are configured in `wrangler.toml`.\nUse `npx wrangler kv:namespace create \"CACHE\" --env \u003cstaging/production\u003e`.\n\nTo deploy from local, run `npm run publish:staging` to deploy to staging, and `npm run publish:production` to deploy to the production environment.\n\nTo deploy using GitHub, run `make deploy-staging` to force push and deploy to staging, and `make deploy-production` to force push and deploy to the production environment.\n\nLive logs for both environments can be accessed with `npm run logs:staging` and `npm run logs:production` as needed.\n\n\u003c!-- Contributing --\u003e\n## Contributing\n\nContributions are always welcome to this project!\\\nTake a look at any existing issues on this repository for starting places to help contribute towards, or simply create your own new contribution to the project.\n\nPlease make sure to follow the existing standards within the project such as code styles, naming conventions and commenting/documentation.\n\nWhen you are ready, simply create a pull request for your contribution and I will review it whenever I can!\n\n### Donating\n\nYou can also help me and the project out by sponsoring me through [GitHub Sponsors](https://github.com/users/MattIPv4/sponsorship) (preferred), contributing through a [donation on PayPal](http://paypal.mattcowley.co.uk/) or by supporting me monthly on my [Patreon page](http://patreon.mattcowley.co.uk/).\n\u003cp\u003e\n    \u003ca href=\"https://github.com/users/MattIPv4/sponsorship\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/GitHub%20Sponsors-MattIPv4-blue.svg?logo=github\u0026logoColor=FFF\u0026style=flat-square\" alt=\"GitHub Sponsors\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://patreon.mattcowley.co.uk/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Patreon-IPv4-blue.svg?logo=patreon\u0026logoColor=F96854\u0026style=flat-square\" alt=\"Patreon\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"http://paypal.mattcowley.co.uk/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/PayPal-Matt%20(IPv4)%20Cowley-blue.svg?logo=paypal\u0026logoColor=00457C\u0026style=flat-square\" alt=\"PayPal\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003c!-- Discussion \u0026 Support --\u003e\n## Discussion, Support and Issues\n\nNeed support with this project, have found an issue or want to chat with others about contributing to the project?\n\u003e Please check the project's issues page first for support \u0026 bugs!\n\nNot found what you need here?\n\n* If you have an issue, please create a GitHub issue here to report the situation, include as much detail as you can!\n* _or,_ You can join our Slack workspace to discuss any issue, to get support for the project or to chat with contributors and myself:\n\n\u003ca href=\"http://slack.mattcowley.co.uk/\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Slack-MattIPv4-blue.svg?logo=slack\u0026logoColor=blue\u0026style=flat-square\" alt=\"Slack\" height=\"30\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMattIPv4%2FDNS-over-Discord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMattIPv4%2FDNS-over-Discord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMattIPv4%2FDNS-over-Discord/lists"}