Skip to content

Transparency: label blocked/allowed in traffic log; whitelist Cloudflare CDN (WI-6: #554, #561, #358) - #607

Merged
kasnder merged 1 commit into
masterfrom
claude/fix-554-blocked-transparency
Jul 11, 2026
Merged

Transparency: label blocked/allowed in traffic log; whitelist Cloudflare CDN (WI-6: #554, #561, #358)#607
kasnder merged 1 commit into
masterfrom
claude/fix-554-blocked-transparency

Conversation

@kasnder

@kasnder kasnder commented Jul 11, 2026

Copy link
Copy Markdown
Member

WI-6 — Transparency: blocked connections invisible / unlabelled

Fixes the visibility half of WI-6. References #554, #561, #358.

Problem

What changed

1. Traffic log now labels blocked/allowed (#561)AdapterLog.java + res/layout/log.xml

  • Added a per-row coloured text label (BLOCKED red / ALLOWED green), mirroring the TimelineAdapter idiom. Reuses existing resources R.string.blocked / R.string.allowed and R.color.timeline_blocked / R.color.timeline_allowed. Label is hidden when the allowed state is unknown (allowed < 0).

2. Whitelist Cloudflare's shared CDN (#554 partial)TrackerList.java

  • Added cloudflare.com to ignoreDomains. Verified the mechanism first: isIgnoredDomain() does an exact registrable-domain match against the domains listed in the blocklists. In the Disconnect list Cloudflare appears as cloudflare.com (the shared CDN fronting e.g. cdnjs.cloudflare.com), cloudflareinsights.com (its Web Analytics beacon), and cloudflarestream.com. cloudflare.com is the correct analogue of cloudfront.net/fastly.net; the analytics beacon cloudflareinsights.com is deliberately left blockable (exact match won't touch it).

Root cause (attribution half — see Out of scope)

updateAccess, which feeds the per-app tracker list, runs only when isTracker is true (ServiceSinkhole.java ~978), while the raw log is written whenever logging is on (~974). In addition, TrackerList.getAppTrackers() (~337-339) skips any access row where findTracker(host) == null. So a blocked-but-unrecognised connection has no toggleable per-app row.

Deliberately out of scope

  • Surfacing blocked-but-unattributed connections as toggleable per-app rows (Reddit API domain is being blocked but not shown in TrackerContol #554/Invisible sites or domains are blocked without the possibility of unblocking #358 "no way to unblock"). A correct fix would require (a) changing the access-table population policy to write non-tracker rows — flooding a per-app table with every host each app contacts (battery/DB/philosophy regression), (b) redesigning getAppTrackers() to emit an "unknown" category, and (c) a new per-app/per-host block mechanism that does not exist. Crucially it would still be dishonest: the block decision is IP-based off the UID-global dns table (no uid column) — the deliberately-deferred attribution limitation documented in TODO.md and triage §C-3. Left for a dedicated attribution redesign rather than papered over here.
  • Merge-friction note: kept edits away from the ServiceSinkhole.getDns region (~1330-1450) and the TrackerList.loadTrackers/JSON-parse region (~178/524) that concurrent PRs touch.

Testing

  • ./gradlew :app:compileGithubDebugJavaWithJavac compiled cleanly (Java + resources) on first run. Only Java/resources were touched; no packet-path change.
  • I could not capture screenshots. A maintainer should visually confirm the new BLOCKED/ALLOWED labels in the traffic log render correctly in light and dark themes.

🤖 Generated with Claude Code

…are CDN (#554, #561, #358)

WI-6 (visibility half). Users cannot tell what is blocked, and legitimate
Cloudflare-fronted content is over-blocked as a shared-IP tracker.

- AdapterLog / log.xml (#561): the raw traffic log encoded blocked-vs-allowed
  only via a small tinted connection icon. Add an explicit coloured "BLOCKED"/
  "ALLOWED" text label per row, mirroring the TimelineAdapter idiom
  (R.color.timeline_blocked / timeline_allowed, R.string.blocked / allowed).
  Hidden when the allowed state is unknown (allowed < 0).

- TrackerList.ignoreDomains (#554 partial): the shared-CDN false-positive
  whitelist covered cloudfront.net and fastly.net but not Cloudflare. Add
  cloudflare.com (the shared CDN fronting e.g. cdnjs.cloudflare.com), matching
  the existing exact-domain pattern. Cloudflare's analytics beacon
  (cloudflareinsights.com) is deliberately left blockable.

Deliberately out of scope: surfacing blocked-but-unattributed connections as
toggleable per-app rows (#554/#358 "no way to unblock"). updateAccess only runs
for recognised trackers, and getAppTrackers() skips rows where
findTracker(host) == null; making these visible/toggleable would require
changing the access-table population policy (flooding a per-app table with every
host each app contacts), a new per-app/per-host block mechanism, and would still
be dishonest because the block decision is IP-based off the UID-global dns table
(the deferred attribution limitation in TODO.md / triage C-3). Left for a
dedicated attribution redesign.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kasnder
kasnder marked this pull request as ready for review July 11, 2026 00:44
@kasnder
kasnder merged commit b84e5a2 into master Jul 11, 2026
1 check passed
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.

1 participant