tailscale/net/dns/resolver
Andrea Gottardo dd77111462
xcode/iOS: set MatchDomains when no route requires a custom DNS resolver (#10576)
Updates https://github.com/tailscale/corp/issues/15802.

On iOS exclusively, this PR adds logic to use a split DNS configuration in more cases, with the goal of improving battery life. Acting as the global DNS resolver on iOS should be avoided, as it leads to frequent wakes of IPNExtension.

We try to determine if we can have Tailscale only handle DNS queries for resources inside the tailnet, that is, all routes in the DNS configuration do not require a custom resolver (this is the case for app connectors, for instance).

If so, we set all Routes as MatchDomains. This enables a split DNS configuration which will help preserve battery life. Effectively, for the average Tailscale user who only relies on MagicDNS to resolve *.ts.net domains, this means that Tailscale DNS will only be used for those domains.

This PR doesn't affect users with Override Local DNS enabled. For these users, there should be no difference and Tailscale will continue acting as a global DNS resolver.

Signed-off-by: Andrea Gottardo <andrea@tailscale.com>
2024-05-29 12:11:02 -07:00
..
debug.go all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
doh_test.go net/dns/resolver: remove maxDoHInFlight 2023-02-03 17:07:12 -08:00
forwarder_test.go all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
forwarder.go net/dns/resolver, control/controlknobs, tailcfg: use UserDial instead of SystemDial to dial DNS servers 2024-05-06 17:29:24 -05:00
macios_ext.go all: avoid repeated default interface lookups 2023-04-20 15:46:01 -07:00
tsdns_server_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
tsdns_test.go xcode/iOS: set MatchDomains when no route requires a custom DNS resolver (#10576) 2024-05-29 12:11:02 -07:00
tsdns.go xcode/iOS: set MatchDomains when no route requires a custom DNS resolver (#10576) 2024-05-29 12:11:02 -07:00