Notify about missing local network access, and stop misdiagnosing it - #709
Merged
kasnder merged 1 commit intoAug 5, 2026
Merged
Conversation
The banner only reaches someone who opens the app, and the settings prompt only someone already changing that setting. The symptom is "nothing resolves", which nobody attributes to a permission — the likely responses are to turn the VPN off or uninstall, neither of which the app ever hears about. Add a notification from where the tunnel is built, so the reason meets the user where the failure appears. It alerts once, clears as soon as the permission is granted, and opens the main screen, where the warning row requests it. The existing notifications actively misdiagnose this case. A LAN resolver we may not talk to raises the DoH one — "Secure DNS cannot be reached ... consider disabling it in the Network settings" — which blames the wrong thing and recommends turning off a feature that works fine; a WireGuard peer on the LAN sends the user into the WireGuard settings for the same non-reason. Both now check isMissing() first and defer to the local network notification, which names the actual cause and fixes it in one tap. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
kasnder
force-pushed
the
fix/local-network-notification
branch
from
August 5, 2026 09:13
7f880e8 to
019685b
Compare
This was referenced Aug 5, 2026
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.
Stacked on #707, which is stacked on #704. Review those first; each retargets automatically as the one below it merges.
The problem
After #704 and #707, everything that tells the user about missing local network access requires them to already be in the app:
dns,doh_*,wg_*,socks5_*or tethering modeLog.winServiceSinkholeBut the symptom is "nothing resolves", and nobody attributes that to a permission. The likely responses are to turn the VPN off or uninstall — neither of which the app ever hears about.
Worse, the notifications that do fire today point at the wrong thing. A LAN resolver we are not allowed to reach raises the DoH one:
That blames DoH and recommends disabling a feature that works fine. A WireGuard peer on the LAN likewise sends the user into the WireGuard settings for a problem that is not there.
The change
NOTIFY_LOCAL_NETWORKnotification, raised from the same place as the existingLog.w— where the tunnel is built — and cleared as soon as the permission is granted.setOnlyAlertOnce, since the tunnel is rebuilt on every network change. Tapping it opens the main screen, where the warning row requests the permission.showDohErrorNotification()andshowWireGuardErrorNotification()checkisMissing()first and defer to it, so the user gets the actual cause and a one-tap fix instead of misleading advice.Follows the established pattern of
NOTIFY_DOH_ERROR/NOTIFY_WG_ERROR: same channel, same category, sameVISIBILITY_SECRET.The notification is an additional channel, not a replacement for the warning row —
POST_NOTIFICATIONSmay itself be denied, which is what the other row exists for.Testing
On a Pixel 8 (Android 17, API 37), notification permission granted:
192.168.178.50, permission denied, VPN enabled — notification posted, titleLocal network access needed, body naming the cause and what to tap.https://192.168.178.128:8443/dns-query, permission denied — the user getsLocal network access needed; the misleading "Secure DNS cannot be reached … consider disabling it" is not posted.https://192.0.2.1/dns-querywith the permission granted — the DoH notification posts as before, once the proxy's failure threshold trips. The substitution has not swallowed the genuine DoH case.One honest limit: in the third scenario both the tunnel-build path and the
showDohErrorNotification()guard have the same trigger condition and post the same notification, so which of the two posted it is not distinguishable from outside. What is verified is the user-visible property — the correct message appears and the misleading one does not.