tailscale/net/tsdial
Nick Khyl caa3d7594f ipn/ipnlocal, net/tsdial: plumb routes into tsdial and use them in UserDial
We'd like to use tsdial.Dialer.UserDial instead of SystemDial for DNS over TCP.
This is primarily necessary to properly dial internal DNS servers accessible
over Tailscale and subnet routes. However, to avoid issues when switching
between Wi-Fi and cellular, we need to ensure that we don't retain connections
to any external addresses on the old interface. Therefore, we need to determine
which dialer to use internally based on the configured routes.

This plumbs routes and localRoutes from router.Config to tsdial.Dialer,
and updates UserDial to use either the peer dialer or the system dialer,
depending on the network address and the configured routes.

Updates tailscale/corp#18725
Fixes #4529

Signed-off-by: Nick Khyl <nickk@tailscale.com>
2024-05-06 15:44:44 -05:00
..
dnsmap_test.go types/netmap: remove NetworkMap.{Addresses,MachineStatus} 2023-09-18 17:08:11 +01:00
dnsmap.go all: remove LenIter, use Go 1.22 range-over-int instead 2024-02-25 12:29:45 -08:00
dohclient_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
dohclient.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
peerapi_macios_ext.go all: cleanup unused code, part 1 (#10661) 2023-12-20 14:50:30 -08:00
tsdial.go ipn/ipnlocal, net/tsdial: plumb routes into tsdial and use them in UserDial 2024-05-06 15:44:44 -05:00