tailscale/wgengine/magicsock
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
..
debughttp.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
debugknobs_stubs.go derp,magicsock: add debug envknobs for HTTP and derp server name (#7744) 2023-04-04 17:10:50 -07:00
debugknobs.go derp,magicsock: add debug envknobs for HTTP and derp server name (#7744) 2023-04-04 17:10:50 -07:00
discopingpurpose_string.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
magicsock_default.go net/neterror, wgengine/magicsock: use UDP GSO and GRO on Linux (#7791) 2023-04-04 16:32:16 -07:00
magicsock_linux.go net/neterror, wgengine/magicsock: use UDP GSO and GRO on Linux (#7791) 2023-04-04 16:32:16 -07:00
magicsock_test.go wgengine/magicsock: prefer private endpoints to public ones 2023-06-08 12:23:28 -04:00
magicsock_unix_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
magicsock.go wgengine/magicsock: prefer private endpoints to public ones 2023-06-08 12:23:28 -04:00
pathfinder.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00