From a509e29af51583cc15ba46bb5802a10c95d1bdc2 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 13 Jun 2026 15:37:49 +0000 Subject: [PATCH 1/5] test: add characterization tests before dependency upgrade MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lock current behavior of CSP augmentation, request-type detection, URL normalization, opaque-upgrade detection, TOML config round-trip, and CA-signed cert/server-config assembly so the dependency upgrade can be verified as behavior-preserving. build(deps): phase 1 — low-risk bumps (thiserror 2, toml 1, dirs 6) - privaxy: toml 0.8->1, thiserror 1->2, dirs 5->6, serde_with 3.8->3.21, env_logger 0.11.3->0.11.10, uluru 3.0->3.1, async-compression 0.4.11->0.4.42, tera pin relaxed to 1.x (argon2 kept on 0.5, tera on 1.x: latest are pre-releases, excluded per semver). - filterlists-api: thiserror 1->2, reqwest 0.12->0.13. - web_frontend: thiserror 1->2. - thiserror 2 dropped raw-identifier (r#type) support in #[error] format strings; updated FilterListAPIError accordingly. Also retains the reqwest client tcp_keepalive removal in server/lib.rs. Characterization tests remain green (cargo test -p privaxy --lib). feat(deps): phase 2 — migrate server to hyper 1.0 / rustls 0.23 / warp 0.4 Upgrades the proxy/web-server HTTP+TLS stack to current majors: - hyper 0.14 -> 1, http 0.2 -> 1, add hyper-util + http-body-util. - rustls 0.21 -> 0.23, tokio-rustls 0.24 -> 0.26, hyper-rustls 0.24 -> 0.27, all pinned to the ring provider (default-features=false) so the tier-3 MIPS/musl cross builds keep working (aws-lc-rs needs a C toolchain). - reqwest 0.11 -> 0.13 (rustls-no-provider + ring, process-default provider). Key code changes: - Install the ring CryptoProvider once at startup (rustls 0.23 requires a process default before any TLS config is built). - Replace hyper's removed Server/Client/Body: the proxy now hand-accepts connections and drives them with hyper-util's auto builder (HTTP/1+2 + upgrades), preserving header-case and tcp_keepalive(600s); the upgrade client uses hyper-util's legacy Client. Streaming response bodies use an mpsc + http_body_util::StreamBody channel (replacing hyper::body::Sender), wrapping upgraded streams in TokioIo. - cert.rs: rustls 0.23 CertificateDer/PrivateKeyDer + builder safe-defaults. - warp 0.3 -> 0.4 (built on hyper 1). warp 0.4 removed built-in TLS and the graceful-shutdown server, so the web GUI is now served via hyper-util with optional tokio-rustls termination (WebSocket live feeds still upgrade). - argon2: enable std feature to restore OsRng after feature unification shift. Characterization tests remain green (cargo test -p privaxy --lib). feat(deps): phase 3 — migrate frontend to yew 0.23 / gloo-net - yew 0.19 -> 0.23 (csr feature), yew-router 0.16 -> 0.20, gloo-utils 0.1 -> 0.3, gloo-timers 0.2 -> 0.4, web-sys 0.3.69 -> 0.3.77, wasm-bindgen -> 0.2.125. - Replace the deprecated reqwasm with gloo-net (http + websocket); gloo-net's RequestBuilder::body/json now return Result, so call sites unwrap and order header() before body(). - yew API migration: start_app -> Renderer::render; Component::changed gains the old_props parameter; +