HTTP(s) proxy support, autodetected from the environment.
Monitoring HTTP server, with exported variables and tracing to help
Separate resolution for specific domains, useful for home networks with
local DNS servers.
The dnss package installs the daemon configured in proxy mode and ready to
use, using Google’s public resolvers (and easily changed via configuration).
sudo apt install dnss
To download and build the binary:
go install blitiri.com.ar/go/dnss
And if you want to configure the daemon to be automatically run by systemd:
# Copy the binary to a system-wide location.
sudo cp "$GOPATH/bin/dnss" /usr/local/bin/
# Set it up in systemd.
sudo cp "$GOPATH"/src/blitiri.com.ar/go/dnss/etc/systemd/dns-to-https/* \
sudo systemctl dnss enable
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):
# Use Cloudflare's 220.127.116.11:
dnss -enable_dns_to_https -https_upstream="https://18.104.22.168/dns-query"
# Use Google's dns.google.com:
dnss -enable_dns_to_https -https_upstream="https://dns.google.com/resolve"
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.
dnss -enable_https_to_dns \