Repository navigation
Fix LAN sync timeouts over Tailscale and find a moved peer by broadcast - #370
Merged
Merged
Conversation
Dead addresses (a LAN seen from a tailnet) were tried in turn under a 45s timeout and outlasted the host's 30s window.
A scan reaches whoever is on the network; the probe is an HMAC challenge both ways. Protocol 4.
A 253-host connect sweep is what campus networks quarantine for.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LAN dialing tried each address in turn under a 45s timeout, so an address that drops packets (the LAN seen over Tailscale, a docker bridge) outlasted the host's 30s window and sync timed out. Addresses are now probed in parallel with a 3s check and the offer goes to the first that answers; paired devices keep every address the peer announces, and when all of them are stale Connect finds the peer with one UDP broadcast from port 47921, so a single TCP+UDP 47921 rule covers both sides. A reconnect's probe, over HTTP or the broadcast, is an HMAC challenge so the token only goes to a host that proves it holds it; this bumps the protocol to 4. Error text in snack bars and on the sync pages is now selectable.