tailscale/ipn
Brad Fitzpatrick 34d2f5a3d9 tailcfg: add Endpoint, EndpointType, MapRequest.EndpointType
Track endpoints internally with a new tailcfg.Endpoint type that
includes a typed netaddr.IPPort (instead of just a string) and
includes a type for how that endpoint was discovered (STUN, local,
etc).

Use []tailcfg.Endpoint instead of []string internally.

At the last second, send it to the control server as the existing
[]string for endpoints, but also include a new parallel
MapRequest.EndpointType []tailcfg.EndpointType, so the control server
can start filtering out less-important endpoint changes from
new-enough clients. Notably, STUN-discovered endpoints can be filtered
out from 1.6+ clients, as they can discover them amongst each other
via CallMeMaybe disco exchanges started over DERP. And STUN endpoints
change a lot, causing a lot of MapResposne updates. But portmapped
endpoints are worth keeping for now, as they they work right away
without requiring the firewall traversal extra RTT dance.

End result will be less control->client bandwidth. (despite negligible
increase in client->control bandwidth)

Updates tailscale/corp#1543

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-04-13 10:12:14 -07:00
..
ipnlocal tailcfg: add Endpoint, EndpointType, MapRequest.EndpointType 2021-04-13 10:12:14 -07:00
ipnserver ipn, paths, cmd/tailscaled: remove LegacyConfigPath, relaynode migration 2021-04-07 10:15:45 -07:00
ipnstate net/{packet,tstun}: send peerapi port in TSMP pongs 2021-03-29 15:18:23 -07:00
localapi ipn/localapi: only require read access to list file targets 2021-04-13 08:35:16 -07:00
policy ipn/policy: mark peerapi4 and peerapi6 as interesting services 2021-04-01 11:57:24 -07:00
backend.go ipn/ipnlocal: add LocalBackend.SetDirectFileRoot 2021-04-12 14:29:45 -07:00
doc.go Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
fake_test.go ipn/localapi: move EditPrefs to localapi 2021-04-11 16:11:43 -07:00
handle.go ipn: move Options.Notify to its own method 2021-04-06 22:12:40 -07:00
message.go ipn: set BackendServer's notify earlier; don't require Start 2021-04-12 10:38:51 -07:00
message_test.go ipn: move Options.Notify to its own method 2021-04-06 22:12:40 -07:00
prefs.go ipn/ipnlocal,wgengine/router,cmd/tailscale: add flag to allow local lan access when routing traffic via an exit node. 2021-04-12 17:29:01 -07:00
prefs_clone.go ipn/ipnlocal,wgengine/router,cmd/tailscale: add flag to allow local lan access when routing traffic via an exit node. 2021-04-12 17:29:01 -07:00
prefs_test.go ipn/ipnlocal,wgengine/router,cmd/tailscale: add flag to allow local lan access when routing traffic via an exit node. 2021-04-12 17:29:01 -07:00
store.go wgkey: new package 2020-12-30 17:33:02 -08:00
store_test.go Add tstest.PanicOnLog(), and fix various problems detected by this. 2020-05-13 23:12:35 -04:00