Add Wi-Fi auto-pause keyed on default-gateway MAC (permission-free)#184
Open
7onnie wants to merge 5 commits into
Open
Add Wi-Fi auto-pause keyed on default-gateway MAC (permission-free)#1847onnie wants to merge 5 commits into
7onnie wants to merge 5 commits into
Conversation
added 5 commits
June 18, 2026 22:52
… tests normalizeMAC guards each octet with isHexDigit so a leading sign (which Swift's Int(_:radix:) would otherwise accept) cannot produce a malformed non-nil MAC.
…MAC resolver Pause state seeds to true so the asynchronous first gateway resolution at launch cannot let an auto-unlock slip through on a disabled network; it relaxes to active only once a non-allowlisted gateway MAC is confirmed. Notification keys are registered in the keys slot (not patterns).
… Network' menu pausedByNetwork seeds to true so no auto-lock/unlock can fire before the first asynchronous gateway resolution completes at launch.
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.
Implements #142: completely pause auto-lock/unlock on user-designated home networks, identified permission-free by the default gateway's MAC (route/ping/arp) — no SSID, no Location permission. Network changes are detected via SCDynamicStore; resolution runs off the main queue; pause state is sticky across transient failures (and seeds to paused at launch so the first async resolution can't let an unlock slip through). Pure parsing/state logic is covered by standalone tests in Tests/.