Skip to content

DNS over HTTP/2 DoH Daemon (Containerized Auto-Build Version)

License

Notifications You must be signed in to change notification settings

containerfactory/dnss

Repository files navigation

dnss

dnss is a daemon for using DNS over HTTPS.

It can act as a proxy (the most common use case), and as a server (in case you want end to end control).

Build Status Go Report Card

Features

  • Supports the JSON-based protocol as implemented by dns.google.com (reference).
  • Supports the DNS Queries over HTTPS (DoH) proposed standard (and implemented by Cloudflare's 1.1.1.1).
  • Local cache (optional).
  • HTTP(s) proxy support, autodetected from the environment.
  • Monitoring HTTP server, with exported variables and tracing to help debugging.
  • Separate resolution for specific domains, useful for home networks with local DNS servers.

Install

Run as a docker container. It accepts all options like the standalone version on the command line

docker run -it --rm containerfactory/dnss  --help

Examples

DNS server (proxy mode)

Listens on port 53 for DNS queries, resolves them using the given HTTPS URL.

# Use the default HTTPS URL (currently, dns.google.com):
dnss -enable_dns_to_https

# Use Cloudflare's 1.1.1.1:
dnss -enable_dns_to_https -https_upstream="https://1.1.1.1/dns-query"

# Use Google's dns.google.com:
dnss -enable_dns_to_https -https_upstream="https://dns.google.com/resolve"

HTTPS server

Receives DNS over HTTPS requests, resolves them using the machine's configured DNS servers, and returns the replies. You will need to have certificates for the domains you want to serve.

Supports both DoH and JSON modes automatically, and the endpoints are /dns-query and /resolve.

# Serve DNS over HTTPS requests, take certificates from letsencrypt.
DOMAIN=yourdomain.com
dnss -enable_https_to_dns \
  -https_key=/etc/letsencrypt/live/$DOMAIN/privkey.pem \
  -https_cert=/etc/letsencrypt/live/$DOMAIN/fullchain.pem

About

DNS over HTTP/2 DoH Daemon (Containerized Auto-Build Version)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published