tailscale/ipn
Josh Bleecher Snyder 63cd581c3f safesocket: add ConnectionStrategy, provide control over fallbacks
fee2d9fad added support for cmd/tailscale to connect to IPNExtension.
It came in two parts: If no socket was provided, dial IPNExtension first,
and also, if dialing the socket failed, fall back to IPNExtension.

The second half of that support caused the integration tests to fail
when run on a machine that was also running IPNExtension.
The integration tests want to wait until the tailscaled instances
that they spun up are listening. They do that by dialing the new
instance. But when that dial failed, it was falling back to IPNExtension,
so it appeared (incorrectly) that tailscaled was running.
Hilarity predictably ensued.

If a user (or a test) explicitly provides a socket to dial,
it is a reasonable assumption that they have a specific tailscaled
in mind and don't want to fall back to IPNExtension.
It is certainly true of the integration tests.

Instead of adding a bool to Connect, split out the notion of a
connection strategy. For now, the implementation remains the same,
but with the details hidden a bit. Later, we can improve that.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-12-09 15:46:38 -08:00
..
ipnlocal ipn/ipnstate: remove old deprecated TailAddr IPv4-only field 2021-12-09 09:28:23 -08:00
ipnserver safesocket: add ConnectionStrategy, provide control over fallbacks 2021-12-09 15:46:38 -08:00
ipnstate ipn/ipnstate: remove old deprecated TailAddr IPv4-only field 2021-12-09 09:28:23 -08:00
localapi net/tsdial: move more weirdo dialing into new tsdial package, plumb 2021-12-01 10:36:55 -08:00
policy ipn/policy: treat DNS service as interesting so it's not filtered out 2021-12-03 12:55:54 -08:00
store/aws ipn/store/aws: support using sub-paths in parameters 2021-11-29 07:48:01 -08:00
backend.go ipn: use key.NodePublic instead of tailcfg.NodeKey 2021-11-01 20:32:10 -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{,/ipnlocal}, cmd/tailscale/cli: don't check pref reverts on initial up 2021-04-18 08:12:18 -07:00
handle.go ipn: another controlplane synonym 2021-07-13 08:22:10 -07:00
message.go ipn: don't log IPN messages that may contain an authkey. 2021-09-22 20:32:49 -07:00
message_test.go ipn: allow b to be nil in NewBackendServer 2021-05-19 09:33:19 -07:00
prefs.go ipn: fix formatting of ExitNodeIP in MaskedPrefs 2021-10-13 14:52:50 -07:00
prefs_clone.go cmd/cloner: mangle "go:generate" in cloner.go 2021-10-16 17:53:43 -07:00
prefs_test.go types/persist: use new node key type. 2021-10-28 10:29:43 -07:00
store.go ipn: remove mention of wgkey in comment. 2021-10-28 10:40:44 -07:00
store_test.go ipn: test TestFileStore in a fresh subdirectory 2021-09-24 15:05:10 -07:00