S049: ad blocker on WebKit content filters, web process extension, RAM check
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
bb1c1a5ed7
commit
8df37bafa1
1 changed files with 14 additions and 3 deletions
|
|
@ -390,6 +390,17 @@ Later: S010 list: user checks the Discord icon with their own client (the Discor
|
|||
- Not done: notification popup not seen on screen (user switched workspace; `/notifications` count checked hidden); inspector detach, camera/mic with a real device, HTTP auth for a proxy, settings page rows not re-shot.
|
||||
- Later: egui colour picker shows broken glyph chips (missing emoji in Nacre's fonts); user-visible Servo texts in settings.rs/misc.rs (About, freeze tabs, Widevine, clear data, task manager); closing a window/quit doesn't run beforeunload; smoke.sh still refuses visible runs without the niri rule (D-045 says it's not needed) and keeps a private bus (no portal); pop-ups never open as separate windows (WebKit window properties unused).
|
||||
|
||||
## S049 — Ad blocker on WebKit: content filters + web process extension (2026-11-13)
|
||||
- Done: network rules → WebKit content filters (`adblock::convert`, deduped, split at WebKit's 150 000-rule limit with every exception in each filter), compiled once per list fingerprint in `UserContentFilterStore`; per-site pause / off = filters detached in `decide-policy`; engine now cosmetic-only. `webext/` cdylib (minimal FFI, no maintained bindings): DNT/Sec-GPC/Save-Data, sub-resource tracking-param strip, `$redirect=` stand-ins via `nacre-resource:` (browser-served), blocked counts. `net::rules` shared by `#[path]`. `policy::decide` lost its ad blocker branch (main frames + Images only, still unwired → S050).
|
||||
- Coverage (seed lists): 152 610 network rules, 151 179 converted (99.1 %), 149 902 WebKit rules, 268 redirects; dropped by reason in DESIGN.md "Ad blocker on WebKit". Conversion 0.4–0.6 s; first WebKit compile 7–18 s (cached after: ms); no network blocking until it's ready on a fresh profile.
|
||||
- Count method: WebKit logs each filter block to the console; the extension's `console-message-sent` reports it (`nacre-blocked`); reset moved into the `load-changed` handler (race). Extension path: `NACRE_WEBEXT_DIR`, `<exe>/../lib/nacre`, else the exe's folder (sandbox loads it from target/release fine).
|
||||
- Fixed (pre-existing): a list change during a build was dropped (builds now queue); with custom lists, own-rule changes never rebuilt.
|
||||
- Selftest `waitstatus <s> <pointer> <json>`, status `/adblock/filters_ready`. smoke.sh visible runs no longer need the niri rule (D-045).
|
||||
- Verified hidden: `net-adblock.txt` (+ stand-in check) and `crash-adblock.txt` exit 0 with `NACRE_NO_BRIDGE=1`; `cargo test` 77 + webext 1. privacy-net: header checks pass (server log: DNT/GPC/Save-Data on every request while on, none off) but the script exits 1: `*.nacre.test` needs DoH through the bridge and third-party cookies (S050).
|
||||
- RAM (hidden, software GL, 4 tabs: new tab, Wikipedia, Guardian, BBC; web process tree PSS, last 20 s median): filters on 1250 MB, off 1276 MB; blocked 1/23/22.
|
||||
- Not done: images permission still not enforced on WebKit (could be one more small filter); privacy-net end criterion (S050); no visible run.
|
||||
- Later: uBO resources (google-ima.js etc.) as stand-ins; `@@` exceptions don't stop extension redirects; `$removeparam` rules.
|
||||
|
||||
## Later
|
||||
- file:// media outside the XDG user folders doesn't play (WebKit sandbox, D-043).
|
||||
- Visible runs need the user to add the niri window rule for `dev.nacre.Nacre` (tools/smoke.sh header, D-044).
|
||||
|
|
|
|||
Loading…
Reference in a new issue