Skip to content

RFC DNS over HTTPS in the DNS proxy

Sam G Nazarko connman 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6dnsproxy: Pass the protocol to cache_update()src/dnsproxy.c+9 -80 replies
2/6doh: Add DNS over HTTPS transportMakefile.am configure.ac src/connman.h +1 more+1904 -30 replies
3/6dnsproxy: Add DNS over HTTPS supportdoc/connman.conf.5.in src/connman.h src/dns-systemd-resolved.c +3 more+1113 -50 replies
4/6manager: Add DNS over HTTPS propertiesdoc/manager-api.txt src/manager.c+123 -00 replies
5/6client: Add doh commandclient/commands.c+137 -00 replies
6/6tools: Allow DNS over HTTPS in dnsproxy-standalonetools/dnsproxy-standalone.c+18 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/6] DNS over HTTPS in the DNS proxy

This series adds DNS over HTTPS (RFC 8484) to the internal DNS proxy, without depending on systemd-resolved or another local resolver. It is an RFC because it makes GnuTLS and nghttp2 mandatory for the internal DNS backend: please say whether you would rather have it behind a configure option, and whether the D-Bus and main.conf interfaces suit you. OSMC is going to ship it with ConnMan 2.0.

The new DNSOverHTTPS setting has four modes:

off plain DNS only (the default)
auto use DoH when every DNS server in use is a public resolver
known to serve it on the same address, so the resolver that answers never changes
on use the DNSOverHTTPSServers, plain DNS while none of them
can be reached
strict like on, but fail rather than fall back

Names only the local network can resolve always go to the network's servers in plain text. Queries share one HTTP/2 connection per server. HTTP/2 is required, as Quad9, Mullvad, DNS4EU and CIRA refuse DoH over HTTP/1.1. Certificates are verified against the system trust store, including IP address SANs. Devices without a real time clock need DNS to set their clock, so while the kernel clock is not synchronised a certificate that is only outside its validity period is accepted, after the chain and the name have been verified again.

The mode, the server list and the state are available on the Manager interface and in connmanctl, and dnsproxy-standalone can use DoH for testing.

The series applies on top of "dnsproxy: Check the question of server replies", which keeps plain DNS replies from answering queries meant to go over HTTPS:
https://lore.kernel.org/connman/b2a0934fd93f76fca771e2a73d6da6d9d1272f76.1793883047.git.email@samnazarko.co.uk/

It was tested on Debian 11 (GnuTLS 3.7.1, nghttp2 1.43) against Quad9, Cloudflare, Google and Wikimedia's resolvers: an IP address URL, host name bootstrap, fallback and strict mode with an unreachable server, a certificate that does not match, truncation for UDP clients, 60 parallel queries over one connection and servers closing idle connections, also under valgrind.

Sam G Nazarko (6):
dnsproxy: Pass the protocol to cache_update()
doh: Add DNS over HTTPS transport
dnsproxy: Add DNS over HTTPS support
manager: Add DNS over HTTPS properties
client: Add doh command
tools: Allow DNS over HTTPS in dnsproxy-standalone

 Makefile.am                 |    6 +-
 client/commands.c           |  137 +++
 configure.ac                |    9 +
 doc/connman.conf.5.in       |   16 +
 doc/manager-api.txt         |   60 ++
 src/connman.h               |   26 +
 src/dns-systemd-resolved.c  |   30 +
 src/dnsproxy.c              | 1031 ++++++++++++++++++-
 src/doh.c                   | 1873 +++++++++++++++++++++++++++++++++++
 src/main.c                  |   41 +
 src/main.conf               |   10 +
 src/manager.c               |   63 ++
 tools/dnsproxy-standalone.c |   20 +-
 13 files changed, 3304 insertions(+), 18 deletions(-)
 create mode 100644 src/doh.c

base-commit: 9e46e4a021cd8566b942d1a72b41b14a0a58f506
prerequisite-patch-id: b73b8f52612f48f24926028c84aba2d2b8058181

Signature · 1 line
2.34.1