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/ipn
Brad Fitzpatrick 91c9c33036 cmd/tailscaled: don't block ipnserver startup behind engine init on Windows
With this change, the ipnserver's safesocket.Listen (the localhost
tcp.Listen) happens right away, before any synchronous
TUN/DNS/Engine/etc setup work, which might be slow, especially on
early boot on Windows.

Because the safesocket.Listen starts up early, that means localhost
TCP dials (the safesocket.Connect from the GUI) complete successfully
and thus the GUI avoids the MessageBox error. (I verified that
pacifies it, even without a Listener.Accept; I'd feared that Windows
localhost was maybe special and avoided the normal listener backlog).

Once the GUI can then connect immediately without errors, the various
timeouts then matter less, because the backend is no longer trying to
race against the GUI's timeout. So keep retrying on errors for a
minute, or 10 minutes if the system just booted in the past 10
minutes.

This should fix the problem with Windows 10 desktops auto-logging in
and starting the Tailscale frontend which was then showing a
MessageBox error about failing to connect to tailscaled, which was
slow coming up because the Windows networking stack wasn't up
yet. Fingers crossed.

Fixes #1313 (previously #1187, etc)

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
3 years ago
..
ipnlocal ipn/ipnlocal: add arpa suffixes to MagicDNS for reverse lookups. 3 years ago
ipnserver cmd/tailscaled: don't block ipnserver startup behind engine init on Windows 3 years ago
ipnstate ipn/ipnlocal, etc: require file sharing capability to send/recv files 3 years ago
localapi ipn/ipnlocal, etc: require file sharing capability to send/recv files 3 years ago
policy ipn/policy: mark peerapi4 and peerapi6 as interesting services 3 years ago
backend.go ipn{,/ipnlocal}: in direct file receive mode, don't rename partial file 3 years ago
doc.go Move Linux client & common packages into a public repo. 4 years ago
fake_test.go ipn{,/ipnlocal}, cmd/tailscale/cli: don't check pref reverts on initial up 3 years ago
handle.go ipn{,/ipnlocal}, cmd/tailscale/cli: don't check pref reverts on initial up 3 years ago
message.go ipn: don't Logout when Windows GUI disconnects 3 years ago
message_test.go ipn: move Options.Notify to its own method 3 years ago
prefs.go ipn, cmd/tailscale/cli: add pref to configure sudo-free operator user 3 years ago
prefs_clone.go ipn, cmd/tailscale/cli: add pref to configure sudo-free operator user 3 years ago
prefs_test.go ipn, cmd/tailscale/cli: add pref to configure sudo-free operator user 3 years ago
store.go wgkey: new package 3 years ago
store_test.go Add tstest.PanicOnLog(), and fix various problems detected by this. 4 years ago