feat: surface allow/bypass reason in connection log bottomsheet#2833
Open
mvanhorn wants to merge 1 commit into
Open
feat: surface allow/bypass reason in connection log bottomsheet#2833mvanhorn wants to merge 1 commit into
mvanhorn wants to merge 1 commit into
Conversation
Show why an allowed connection bypassed existing block rules (isolated, trusted, or bypassed app/IP/domain) in the Network log bottomsheet, so an intended allow-over-block is not mistaken for a bug. The reason row stays hidden for blocked or normally-allowed connections. Fixes celzero#2815
Collaborator
|
Hi @mvanhorn, Thanks for the pull request!! |
hussainmohd-a
requested changes
Jun 29, 2026
hussainmohd-a
left a comment
Collaborator
There was a problem hiding this comment.
In updateBlockedRulesChip(), the reason is fetched (getFirewallRule(ruleId)) regardless of whether the connection is blocked or allowed. Also, there are two proxy override checks.
Could you verify whether the additional check introduces any different behavior? If not, will it end up overriding the existing proxy-related checks and affect what is shown in the UI?
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.
Summary
The Network connection-log bottomsheet now shows why a connection was allowed when a trust or bypass rule (isolated, trusted, or bypassed app/IP/domain) took precedence over universal or app block rules. A small reason row appears under the connection summary; it stays hidden for blocked and normally-allowed connections.
Why this matters
In #2815 a user reported that with "Block all apps when device is locked" active, connections from isolated or trusted apps and domains were still permitted, which looked like a bug. The maintainer confirmed this is intended (bypass/trust rules take precedence) and proposed surfacing the reason in the connection-log bottomsheet. This change adds that transparency without altering any firewall behavior.
What changed
FirewallRuleset.getAllowReason(ruleId)returns the matched rule only when it is an allow-acting bypass rule (act == allowandisBypassRule), else null, so unmapped or block rules show nothing.ConnTrackerBottomSheet.updateAllowReason()renders the reason via the existing rule title into a newbs_conn_allow_reason_textrow, hidden when the connection is blocked or no bypass rule applied.bs_conn_allow_reason_textTextView (gone by default) tobottom_sheet_conn_track.xmland thebsct_allow_reasonstring.Testing
Local Android SDK is not available in this environment, so a full Gradle build was not run. Validated the layout and strings XML for well-formedness, confirmed the new symbols are wired to call sites, and checked the allow-over-block, isolate/trusted, normally-blocked (row hidden), and unmapped-rule (graceful fallback) paths by inspection.
Fixes #2815