Repository navigation
Tighten who LAN sharing and pairing reach - #1941
Merged
Merged
Conversation
… chose A login that arrives from a chosen deck is ticked here so this deck can repair the next machine in the group. That tick is now remembered as the arrival's, beside the shared list, and a deck the accept switch paired is offered only the logins a person ticked. Unticking and ticking the login again makes it a person's tick, offered to every paired deck.
…le places it The local accept switch says yes only to a deck plainly on the local network. An address in Tailscale's block that the last tailnet read could not place (no read yet, a failed read, Tailscale still starting) is now a request for somebody to accept, as an unknown tailnet machine already is. Ordinary local addresses and the owner's own tailnet machines are answered as before.
…r sends The id that folds one computer's decks into one row is now keyed with the machine id the operating system keeps (systemd's or D-Bus's on Linux, the platform UUID on a Mac, the machine GUID on Windows), which never leaves the machine. It stays the same for every deck on it and differs on every other, and a machine with none to read sends the id it sent before. A newer deck still reads the id an older deck on the same machine sends as its own machine.
A beacon answers each new deck once and remembers whom it answered. That memory now keeps no more entries than the heard list does, dropping the one answered longest ago first; a deck dropped that way is answered once more if it is heard again.
Closed
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.
What changes
lan.onward), and a deck the accept switch paired is offered, and handed, only the logins a person ticked. Unticking and ticking the login again makes it a person's tick, offered to every paired deck. README's Local network section says so.MAX_STRANGERS) and drops the oldest first. A deck dropped that way is answered once more if it is heard again.Verification
npm run typecheck: clean.--maxWorkers=3 --minWorkers=1: 901 files, 11783 tests passed.lan-arrival-tick.test.ts: whole engines on loopback. A deck paired by the switch received a login that had been ticked on arrival (importedwas['ccdeck2:slot-7']). It now receives nothing. A deck somebody chose still receives the login, and so does every paired deck once a person ticks it. The tests also cover the prefs side: the mark is written with the tick, an untick drops it, and it is kept out of the page's prefs.lan-tailnet-unread.test.ts: the requests module with the realrouteOf. With no snapshot, or aStartingone, the local switch said yes to 100.101.1.2. It now leaves a request, including when the switch is turned on later. Plain local addresses and the owner's own tailnet machine are unchanged.lan-host-id-private.test.ts: the id no longer comes out of a plain hash of the hostname and home directory. Covers which secret each platform reads (with fakes), what goes out when no secret exists, what the beacon actually sends, and an older deck on the same machine being read asself.lan-beacon-answered-bound.test.ts: before the fix, the first deck answered was never dropped, however many followed. Now it is dropped onceMAX_STRANGERSnewer ones have been answered, and dedup within that window is unchanged.lan-prefs.test.tsandprefs-update-1041.test.tsnow includeonward.