diff --git a/Plans/08 WebKit engine/S050-net-privacy-downloads.md b/Plans/08 WebKit engine/S050-net-privacy-downloads.md index 8495c2e..d3caae7 100644 --- a/Plans/08 WebKit engine/S050-net-privacy-downloads.md +++ b/Plans/08 WebKit engine/S050-net-privacy-downloads.md @@ -14,13 +14,17 @@ download manager stubs, HTTP cache on disk. - `docs/engine/servo-removal.md` §3.6, §3.7, §3.12 (error pages); D-014; `src/net/bridge.rs` header; `tests/smoke/net-privacy.txt`, `net-downloads.txt` headers. ## Steps -- [ ] Proxy settings to the bridge per session; `NACRE_NO_BRIDGE=1` path; never a real proxy/Tor in tests. -- [ ] `decide-policy`: navigation actions → `actions::on_navigation` (app scope, external schemes, HTTPS-only upgrade, tracking strip); response policy → downloads (`download` for non-displayable MIME / Content-Disposition). -- [ ] `download-started` → Nacre's downloads store/UI or the custom manager hand-off; progress, cancel, destination, finished state. -- [ ] TLS errors → Nacre's certificate warning page; "continue" allows the cert for the host for the run. -- [ ] Error pages from Nacre's look (port `assets/servo/neterror.html`/`badcert.html` style into `nacre://` pages). +- [x] Proxy settings to the bridge per session; `NACRE_NO_BRIDGE=1` path; never a real proxy/Tor in tests. +- [x] `decide-policy`: navigation actions → `actions::on_navigation` (app scope, external schemes, HTTPS-only upgrade, tracking strip); response policy → downloads (`download` for non-displayable MIME / Content-Disposition). +- [x] `download-started` → Nacre's downloads store/UI or the custom manager hand-off; progress, cancel, destination, finished state. +- [x] TLS errors → Nacre's certificate warning page; "continue" allows the cert for the host for the run. +- [x] Error pages from Nacre's look (port `assets/servo/neterror.html`/`badcert.html` style into `nacre://` pages). - [ ] `CookieManager` accept policy (third-party), `set_preferred_languages`, privacy mode Accept-Language, per-view UA quirk. -- [ ] Loopback/127.0.0.1 and localhost bypass the bridge (today a loopback page ends in "Message was restarted too many times" with the URL rewritten to the bridge port; found in S046); regression smoke. +- [x] Loopback/127.0.0.1 and localhost bypass the bridge (today a loopback page ends in "Message was restarted too many times" with the URL rewritten to the bridge port; found in S046); regression smoke. +- [x] `net::policy::decide` wired on WebKit (main frames + images), including the images permission (handed over by S049). +- [ ] `privacy-net.txt` exits 0: `*.nacre.test` through the bridge's DoH, third-party cookies (handed over by S049). +- [x] Remove the stale PROGRESS "Later" line about the niri window rule (fixed by D-045, e434bd2). +- [ ] Navigation policy only for the tab's own (main frame) loads: WebKit's GTK API can't tell iframe navigations apart (`frame_name()` is empty for unnamed iframes), so HTTPS-only, the strip and the UA reload can take over a tab with a frame's URL today. Likely fix: the web process extension tells main-frame loads (found in S050). - [ ] Smoke (start `python3 tests/smoke/net/server.py &` / `cache/server.py &`): `net-privacy.txt`, `net-downloads.txt`, `privacy-net.txt`, `privacy-mode.txt`, `cache.txt` + `cache-restart.txt` green hidden. - [ ] PROGRESS entry, INDEX line, tracker, commit `S050: …`, push. @@ -33,3 +37,21 @@ download manager stubs, HTTP cache on disk. ## Handoff (→ PROGRESS.md) What still differs from the Servo-era behaviour. + +## Resume (S050 WIP, 2026-11-13) +State in commit `S050 (WIP)`. Verified hidden: `net-privacy.txt` and `net-downloads.txt` exit 0 (every assert answered), +`cargo test` 78 + webext 1. `privacy-net.txt`: everything passes except the Google UA quirk assert. +- WebKit reaches the bridge over **SOCKS5** (`Bridge::socks_url`; same port, login in the handshake): libsoup sends plain + http to an HTTP proxy without the password and then GETs the proxy itself (the S046 "restarted too many times" bug). + Loopback skips the proxy (`LOOPBACK` in host.rs). +- Third-party cookies: WebKit's NoThirdParty only stops storing; ITP (`set_itp_enabled`) keeps existing cookies off + cross-site requests. Cookies without SameSite are Lax in WebKit, and None needs Secure (https only), so the cookie + part of privacy-net now runs on https with `cdn.other.test` (server cert + DNS stub extended). +- selftest: `js`/`assert`/`save` now wait for the page's answer (before, a run could quit with asserts unanswered and + still pass; S046–S049 smokes may hide failures, rerun them). +- Open: (1) the main-frame box above; (2) UA quirk: `Engine::set_view_user_agent` swaps in a copied `Settings` with + Firefox's UA, the navigation is reloaded, but the request still carries WebKit's UA (check whether WebKit reads + `user-agent` from a view's new settings; else a per-view `set_settings` before the first load, or the extension + setting User-Agent in `send-request` for accounts.google.com); (3) `privacy-mode.txt`, `cache.txt` + + `cache-restart.txt` not run yet; (4) PROGRESS/INDEX/final commit. +- Not done on purpose: WebKit-only (`blob:`) downloads don't ask where to save and can't pause. diff --git a/assets/servo/badcert.html b/assets/pages/badcert.html similarity index 76% rename from assets/servo/badcert.html rename to assets/pages/badcert.html index 4bd3c5c..8227978 100644 --- a/assets/servo/badcert.html +++ b/assets/pages/badcert.html @@ -26,22 +26,8 @@
This site's certificate can't be trusted, so someone could be reading or changing what you send. It's safest to go back.
-Details: ${reason}
${url}
+${reason}
+