{"id":13583053,"url":"https://github.com/commonshost/dohnut","last_synced_at":"2025-04-06T18:31:50.012Z","repository":{"id":57214513,"uuid":"152104860","full_name":"commonshost/dohnut","owner":"commonshost","description":"🍩 DNS to DNS-over-HTTPS (DoH) proxy server","archived":false,"fork":false,"pushed_at":"2020-07-07T19:35:24.000Z","size":532,"stargazers_count":88,"open_issues_count":7,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-01T20:13:52.788Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://help.commons.host/dohnut/","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/commonshost.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}},"created_at":"2018-10-08T15:39:30.000Z","updated_at":"2025-03-02T12:18:02.000Z","dependencies_parsed_at":"2022-08-26T13:31:13.691Z","dependency_job_id":null,"html_url":"https://github.com/commonshost/dohnut","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commonshost%2Fdohnut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commonshost%2Fdohnut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commonshost%2Fdohnut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commonshost%2Fdohnut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commonshost","download_url":"https://codeload.github.com/commonshost/dohnut/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247531033,"owners_count":20953884,"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":[],"created_at":"2024-08-01T15:03:13.499Z","updated_at":"2025-04-06T18:31:49.368Z","avatar_url":"https://github.com/commonshost.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Dohnut\n\n[![](https://img.shields.io/badge/dynamic/json.svg?color=blue\u0026label=Docker%20Hub\u0026query=pull_count\u0026suffix=%20pulls\u0026url=https%3A%2F%2Fhub.docker.com%2Fv2%2Frepositories%2Fcommonshost%2Fdohnut%2F)](https://hub.docker.com/r/commonshost/dohnut)\n\nDohnut is a DNS to DNS-over-HTTPS (DoH) proxy server. Dohnut improves the performance, security, and privacy of your DNS traffic.\n\nhttps://help.commons.host/dohnut/\n\nDohnut works with any open standard ([RFC8484](https://tools.ietf.org/html/rfc8484)) compliant DoH provider, including the [Commons Host](https://commons.host) DoH service and [many others](http://dns-channel.github.io/#recsrv).\n\n![Dohnut overview diagram](./dohnut-overview.png)\n\n## Features\n\n**High Performance** Auto-select the fastest DoH resolver. Continuously adapts to network and service conditions by monitoring the round-trip-tip of the DoH connection using HTTP/2 PING frames.\n\n**High Availability** Allows using multiple DoH resolvers at once to provide automatic failover in case a service is unavailable.\n\n**Zero Overhead** - Network traffic does not go through Dohnut so there is no performance penalty. Only the DNS queries (very little bandwidth) are proxied.\n\n**Lightweight** - Multi-threaded architecture for fast performance on low-power devices like single board computers. Designed for Raspberry Pi and Odroid but compatible with anything that can run Node.js.\n\n**Full Encryption** - DoH encrypts all DNS queries inside a secure HTTP/2 connection. This protects DNS lookups against snooping at your local network router or ISP.\n\n**Connection Sharding** - Spread queries across multiple DoH resolvers for improved privacy. This reduces the amount of information a single DoH service can collect.\n\n**Query Spoofing** - Mask your DNS queries using fake DNS queries. Uses several randomisation techniques and samples from a public list of the top 1 million domains.\n\n**User Agent Spoofing** - Avoid tracking at the HTTP level using fake browser identifiers. Randomly chosen from a public list of real-world browser data.\n\n## Usage\n\nDohnut is lightweight and cross-platform. Dohnut can operate standalone or with other DNS tools like [Pi-hole](https://pi-hole.net).\n\nDohnut can be used in several ways:\n\n- [Command line interface](./docs/cli)\n- [Docker: container image](./docs/docker)\n- [Linux: managed by systemd](./docs/systemd)\n- [macOS: managed by launchd](./docs/launchd)\n- [Pi-hole: upstream DNS server](./docs/pihole)\n- [Docker Compose with Pi-hole: multi-container service](./docs/docker-compose-pihole)\n\nThis example launches Dohnut on your local machine to accept DNS connections and proxy them to the Commons Host DNS over HTTPS (DoH) service. See the [command line interface](./docs/cli) reference for more options.\n\nRun using Docker:\n\n```shell\n$ docker run --publish 53:53/udp commonshost/dohnut --listen 0.0.0.0:53 --doh commonshost --bootstrap 9.9.9.9\n```\n\n... or run using Node.js:\n\n```shell\n$ sudo npx dohnut --listen 127.0.0.1:53 --doh https://commons.host\n\nStarted listening on 127.0.0.1:53 (udp4)\n```\n\nVerify by running a DNS lookup against Dohnut. The query is proxied to the DoH service.\n\n```shell\n$ dig @localhost iana.org\n\n; \u003c\u003c\u003e\u003e DiG 9.10.6 \u003c\u003c\u003e\u003e @localhost iana.org\n; (2 servers found)\n;; global options: +cmd\n;; Got answer:\n;; -\u003e\u003eHEADER\u003c\u003c- opcode: QUERY, status: NOERROR, id: 24758\n;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 4096\n;; QUESTION SECTION:\n;iana.org.\t\t\tIN\tA\n\n;; ANSWER SECTION:\niana.org.\t\t3591\tIN\tA\t192.0.43.8\n\n;; Query time: 4 msec\n;; SERVER: 127.0.0.1#53(127.0.0.1)\n;; MSG SIZE  rcvd: 53\n```\n\n## Credits\n\nMade by [Kenny Shen](https://www.machinesung.com) and [Sebastiaan Deckers](https://twitter.com/sebdeckers) for 🐑 [Commons Host](https://commons.host).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommonshost%2Fdohnut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommonshost%2Fdohnut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommonshost%2Fdohnut/lists"}