tailscale/cmd/tailscaled
Brad Fitzpatrick 58abae1f83 net/dns/{publicdns,resolver}: add NextDNS DoH support
NextDNS is unique in that users create accounts and then get
user-specific DNS IPs & DoH URLs.

For DoH, the customer ID is in the URL path.

For IPv6, the IP address includes the customer ID in the lower bits.

For IPv4, there's a fragile "IP linking" mechanism to associate your
public IPv4 with an assigned NextDNS IPv4 and that tuple maps to your
customer ID.

We don't use the IP linking mechanism.

Instead, NextDNS is DoH-only. Which means using NextDNS necessarily
shunts all DNS traffic through 100.100.100.100 (programming the OS to
use 100.100.100.100 as the global resolver) because operating systems
can't usually do DoH themselves.

Once it's in Tailscale's DoH client, we then connect out to the known
NextDNS IPv4/IPv6 anycast addresses.

If the control plane sends the client a NextDNS IPv6 address, we then
map it to the corresponding NextDNS DoH with the same client ID, and
we dial that DoH server using the combination of v4/v6 anycast IPs.

Updates #2452

Change-Id: I3439d798d21d5fc9df5a2701839910f5bef85463
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-09-08 12:50:32 -07:00
..
childproc cmd/tailscaled/childproc: add be-child registration mechanism 2022-02-24 14:20:20 -08:00
debug.go all: require Go 1.19 2022-08-02 11:49:01 -07:00
depaware.txt net/dns/{publicdns,resolver}: add NextDNS DoH support 2022-09-08 12:50:32 -07:00
install_darwin.go all: require Go 1.19 2022-08-02 11:49:01 -07:00
install_windows.go all: require Go 1.19 2022-08-02 11:49:01 -07:00
proxy.go all: require Go 1.19 2022-08-02 11:49:01 -07:00
required_version.go all: require Go 1.19 2022-08-02 11:49:01 -07:00
ssh.go all: gofmt all 2022-04-29 13:06:04 -07:00
tailscaled.defaults cmd/tailscaled: rename relaynode reference in defaults file comment 2020-03-13 14:38:04 -07:00
tailscaled.go cmd/tailscaled: enable hybrid netstack mode on openbsd too 2022-08-15 14:48:15 -07:00
tailscaled.openrc tstest/integration/vms: use an in-process logcatcher (#2360) 2021-07-08 14:39:45 -04:00
tailscaled.service cmd/tailscaled: set StateDirectoryMode=0700 in tailscaled.service 2021-09-28 09:09:24 -07:00
tailscaled_bird.go all: require Go 1.19 2022-08-02 11:49:01 -07:00
tailscaled_notwindows.go all: require Go 1.19 2022-08-02 11:49:01 -07:00
tailscaled_test.go cmd/tailscaled: add a no-op test for profiling init-time memory allocs 2022-02-24 14:58:12 -08:00
tailscaled_windows.go all: require Go 1.19 2022-08-02 11:49:01 -07:00
with_cli.go cmd/tailscaled: add opt-in support for linking CLI into daemon 2022-07-27 11:15:52 -07:00