You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/cmd/tailscale/cli
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>
3 years ago
..
auth-redirect.html cmd/tailscale/web: add support for QNAP 3 years ago
bugreport.go cmd/tailscale/cli: add Stdout, Stderr and output through them 3 years ago
cert.go cmd/tailscale/cli: add Stdout, Stderr and output through them 3 years ago
cli.go safesocket: add ConnectionStrategy, provide control over fallbacks 3 years ago
cli_test.go cmd/tailscale: fix setting revert checker's finding an exit node 3 years ago
debug.go cmd/tailscale/cli: add --watch flag to "debug metrics" subcommand 3 years ago
diag.go cmd/tailscale: print more detail in connection failure error message 3 years ago
diag_other.go all: gofmt with Go 1.17 3 years ago
down.go cmd/tailscale/cli: add, use log.Fatalf indirection for js/wasm 3 years ago
file.go cmd/tailscale: make file cp send files via tailscaled localapi 3 years ago
ip.go cmd/tailscale: add ip -1 flag 3 years ago
logout.go cmd/tailscale/cli: add, use log.Fatalf indirection for js/wasm 3 years ago
netcheck.go cmd/tailscale/cli: add, use log.Fatalf indirection for js/wasm 3 years ago
ping.go cmd/tailscale/cli: add, use log.Fatalf indirection for js/wasm 3 years ago
status.go ipn/ipnstate, cmd/tailscale: add Online bool to tailscale status & --json 3 years ago
up.go cmd/tailscale: add --json for up 3 years ago
version.go cmd/tailscale/cli: add, use log.Fatalf indirection for js/wasm 3 years ago
web.css cli: web advertise exit node button 3 years ago
web.go cmd/tailscale/cli: add, use log.Fatalf indirection for js/wasm 3 years ago
web.html cli: web advertise exit node button 3 years ago
web_test.go cmd/tailscale: update web server test copyright 3 years ago