Skip to content

Fix LAN sync timeouts over Tailscale and find a moved peer by broadcast - #370

Merged
Yiannis128 merged 4 commits into
masterfrom
sync-lan-addresses
Oct 21, 2026
Merged

Yiannis128 merged 4 commits into
masterfrom
sync-lan-addresses

Conversation

@Yiannis128

@Yiannis128 Yiannis128 commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

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.

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.
@Yiannis128 Yiannis128 changed the title Probe sync addresses in parallel, keep all of them, scan LAN as fallback Fix LAN sync timeouts over Tailscale and find a moved peer by broadcast Oct 21, 2026
@Yiannis128
Yiannis128 merged commit 2bc24d9 into master Oct 21, 2026
1 check passed
@Yiannis128
Yiannis128 deleted the sync-lan-addresses branch October 21, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant