Skip to content

Add Wi-Fi auto-pause keyed on default-gateway MAC (permission-free) - #184

Open
7onnie wants to merge 196 commits into
ts1:masterfrom
7onnie:feature/wifi-auto-pause-gateway-mac
Open

Add Wi-Fi auto-pause keyed on default-gateway MAC (permission-free)#184
7onnie wants to merge 196 commits into
ts1:masterfrom
7onnie:feature/wifi-auto-pause-gateway-mac

Conversation

@7onnie

@7onnie 7onnie commented Jun 18, 2026

Copy link
Copy Markdown

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/.

Klaus-J and others added 29 commits January 8, 2022 17:32
commit 8c6d4b9ede6e3e101ba8ce32ec1da66d24ebbe9e
Author: Takeshi Sone <takeshi.sone@gmail.com>
Date:   Sun Jan 16 14:55:04 2022 +0900

    Remove zip

commit edfa3aacdfde4111428a9c6530925b9ce30cf467
Merge: 803dc72 ea17760
Author: Takeshi Sone <takeshi.sone@gmail.com>
Date:   Sun Jan 16 14:54:13 2022 +0900

    Merge branch 'master' into cyberclaus-master

commit 803dc729de552ed42ed684ca07c6a5cd17f9b3a0
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Sun Jan 9 18:24:13 2022 +0100

    Add files via upload

commit 42f921d4606898cbdc6adb7aade0895ebe902bfc
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Sun Jan 9 18:16:07 2022 +0100

    Add files via upload

commit 4a25e743768fc7c17b280db3e3a36aa2d7b54639
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Sun Jan 9 18:15:34 2022 +0100

    Add files via upload

commit 740d3ead61820e0e659f71df0913b881ee9e99b1
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Sun Jan 9 18:14:33 2022 +0100

    Add files via upload

commit 98b9810afb44402c75a8cf35a47e244b8344dcca
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Sun Jan 9 18:13:58 2022 +0100

    Add files via upload

commit 7bf49014eedbe533de0703440472097107aae265
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Thu Jan 6 08:27:48 2022 +0100

    Delete sv.lproj directory

commit 67c2ae8480d3e5664711d083aafb37a3ec6021eb
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Thu Jan 6 08:27:40 2022 +0100

    Delete nb.lproj directory

commit ab6eddaceec6d41460bb550b92ddd7a4a2045177
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Thu Jan 6 08:27:30 2022 +0100

    Delete de.lproj directory

commit 4a0e55ff4ead4122a6107fa3f2777238af052f50
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Thu Jan 6 08:27:21 2022 +0100

    Delete da.lproj directory

commit 0c793764eb768c799c4a058ffeb5319898d7174b
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Thu Jan 6 08:25:44 2022 +0100

    Add files via upload

commit 9629522
Merge: 7b6d951 785d431
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Thu Jan 6 08:30:05 2022 +0100

    Merge branch 'ts1:master' into master

commit 7b6d951
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Thu Jan 6 08:28:36 2022 +0100

    Add files via upload

commit 328a4a4
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Thu Jan 6 08:27:48 2022 +0100

    Delete sv.lproj directory

commit 364ffee
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Thu Jan 6 08:27:40 2022 +0100

    Delete nb.lproj directory

commit a0204f2
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Thu Jan 6 08:27:30 2022 +0100

    Delete de.lproj directory

commit 79e0ed3
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Thu Jan 6 08:27:21 2022 +0100

    Delete da.lproj directory

commit 7096032
Author: Klaus-J <95517970+cyberclaus@users.noreply.github.com>
Date:   Thu Jan 6 08:25:44 2022 +0100

    Add files via upload
Fixed all of the "google translate" errors for the swedish translations
… 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.
@7onnie
7onnie force-pushed the feature/wifi-auto-pause-gateway-mac branch from e2caac1 to 26dc5a2 Compare August 6, 2026 12:52
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.

9 participants