tailscale/wgengine
Andrew Dunham 2a9d46c38f wgengine/magicsock: prefer private endpoints to public ones
Switch our best address selection to use a scoring-based approach, where
we boost each address based on whether it's a private IP or IPv6.

For users in cloud environments, this biases endpoint selection towards
using an endpoint that is less likely to cost the user money, and should
be less surprising to users.

This also involves updating the tests to not use private IPv4 addresses;
other than that change, the behaviour should be identical for existing
endpoints.

Updates #8097

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: I069e3b399daea28be66b81f7e44fc27b2943d8af
2023-06-08 12:23:28 -04:00
..
bench all: move network monitoring from wgengine/monitor to net/netmon 2023-04-20 10:15:59 -07:00
capture various: add golangci-lint, fix issues (#7905) 2023-04-17 18:38:24 -04:00
filter all: use tstest.Replace more 2023-03-04 12:24:55 -08:00
magicsock wgengine/magicsock: prefer private endpoints to public ones 2023-06-08 12:23:28 -04:00
netlog all: avoid repeated default interface lookups 2023-04-20 15:46:01 -07:00
netstack wgengine/netstack: use ping6 on BSD platforms 2023-05-28 09:50:21 -07:00
router all: move network monitoring from wgengine/monitor to net/netmon 2023-04-20 10:15:59 -07:00
wgcfg tailcfg: make SelfNodeV4MasqAddrForThisPeer a pointer 2023-04-13 11:28:33 -07:00
wgint all: update copyright and license headers 2023-01-27 15:36:29 -08:00
wglog all: update copyright and license headers 2023-01-27 15:36:29 -08:00
winnet all: update copyright and license headers 2023-01-27 15:36:29 -08:00
mem_ios.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
pendopen.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
userspace.go tsd: add package with System type to unify subsystem init, discovery 2023-05-04 14:21:59 -07:00
userspace_ext_test.go tsd: add package with System type to unify subsystem init, discovery 2023-05-04 14:21:59 -07:00
userspace_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
watchdog.go tsd: add package with System type to unify subsystem init, discovery 2023-05-04 14:21:59 -07:00
watchdog_js.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
watchdog_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
wgengine.go tsd: add package with System type to unify subsystem init, discovery 2023-05-04 14:21:59 -07:00