diff --git a/.cargo/config.toml b/.cargo/config.toml index 287f441..ff9da01 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,8 +1,17 @@ [target.aarch64-unknown-linux-gnu] linker = "aarch64-linux-gnu-gcc" +# mips{,el}-unknown-linux-gnu: the old glibc in the cross-toolchain lacks the +# `getrandom()` wrapper symbol that getrandom 0.3's default backend calls, so we +# select getrandom's `custom` backend (implemented via the raw SYS_getrandom +# syscall in privaxy's lib.rs). musl MIPS uses getrandom's weak-fallback backend +# and needs no override. +[target.mips-unknown-linux-gnu] +rustflags = ["--cfg", "getrandom_backend=\"custom\""] + [target.mipsel-unknown-linux-gnu] linker = "mipsel-linux-gnu-gcc" +rustflags = ["--cfg", "getrandom_backend=\"custom\""] [target.mipsel-unknown-linux-musl] linker = "mipsel-linux-musl-gcc" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50dd34f..7c2ec06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -355,6 +355,9 @@ jobs: - name: Build packages if: ${{ !endsWith(matrix.target, '-musl') }} run: | + # target/ is cached; discard packages from previous versions. + rm -f target/${{ matrix.target }}/release/privaxy_*.deb \ + target/${{ matrix.target }}/release/privaxy-*.rpm cargo install cargo-deb && cargo deb -p privaxy --target ${{ matrix.target }} -o target/${{ matrix.target }}/release cargo install cargo-generate-rpm && cargo generate-rpm -p privaxy --target ${{ matrix.target }} -o target/${{ matrix.target }}/release - uses: actions/upload-artifact@v4 @@ -366,7 +369,7 @@ jobs: if: ${{ !endsWith(matrix.target, '-musl') }} with: name: privaxy-rpm-${{ matrix.target }} - path: target/${{ matrix.target }}/release/*.rpm + path: target/${{ matrix.target }}/release/privaxy-*.rpm - uses: actions/upload-artifact@v4 with: name: privaxy-${{ matrix.target }} @@ -432,6 +435,9 @@ jobs: - name: Build packages if: ${{ endsWith(matrix.target, '-linux-gnu') }} run: | + # target/ is cached; discard packages from previous versions. + rm -f target/${{ matrix.target }}/release/privaxy_*.deb \ + target/${{ matrix.target }}/release/privaxy-*.rpm variant=$(echo "${{ matrix.target }}" | cut -d- -f1) cargo install cargo-deb && cargo deb --no-build --no-strip --variant "$variant" -p privaxy --target ${{ matrix.target }} -o target/${{ matrix.target }}/release cargo install cargo-generate-rpm && cargo generate-rpm -p privaxy --target ${{ matrix.target }} -o target/${{ matrix.target }}/release @@ -446,7 +452,7 @@ jobs: if: ${{ endsWith(matrix.target, '-linux-gnu') }} with: name: privaxy-rpm-${{ matrix.target }} - path: target/${{ matrix.target }}/release/*.rpm + path: target/${{ matrix.target }}/release/privaxy-*.rpm - uses: actions/upload-artifact@v4 with: @@ -462,6 +468,9 @@ jobs: permissions: contents: write steps: + - name: Checkout release notes + uses: actions/checkout@v6 + - name: Download all artifacts uses: actions/download-artifact@v4 with: @@ -485,6 +494,7 @@ jobs: - name: Create release uses: softprops/action-gh-release@v2 with: + body_path: RELEASE.md files: ./release-assets/* generate_release_notes: true - fail_on_unmatched_files: true \ No newline at end of file + fail_on_unmatched_files: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 41320fa..c09ce61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,350 @@ # Changelog +## Unreleased + +## v0.8.0 - 2026-10-02 + +Release highlights and upgrade notes are in [RELEASE.md](RELEASE.md). + +- Support both plain HTTP and HTTPS inside CONNECT tunnels, allowing compatible + HTTP proxies and adapters to chain into Privaxy. Detect HTTP versus TLS on any + destination port and apply existing filtering, injection, and inclusion and + exclusion policies. Excluded/unselected hosts still bypass inspection, + including server-first protocols. Document hostname preservation and + user-managed routing, with tun2proxy as an example. This adds no configuration + for forwarding Privaxy's own outbound traffic through another upstream proxy. +- Add inclusion-only filtering under Settings → Inclusions & exclusions, with + a separate hostname/wildcard list. Exclusions retain precedence; an empty + inclusion list bypasses all hosts. The mode applies to HTTP, HTTPS, and PAC + generation, updates live through authenticated `GET`/`PUT /api/inclusions`, + and reloads from configuration on SIGHUP. Existing configurations keep their + previous default mode. Ordinary excluded HTTP requests now also bypass + filtering and HTML rewriting. +- Add a Refresh enabled lists action to the Filters page, with progress and + download results, backed by authenticated `POST /api/filters/refresh`. +- Bound Docker log growth in the Compose configuration and documented Docker + commands to three 10 MB files per container. +- Validate cached filter lists instead of accepting empty files as successfully + loaded. Recover a missing or invalid `.txt` from a valid sibling `` + when available, otherwise download it again and report failures. Filter cache + updates now replace files atomically to avoid truncating a working list. +- Wait for the initial filter load before accepting proxy traffic. Previously, + a slow list download left network and cosmetic filtering inactive while the + proxy already appeared ready. The web UI remains available during loading, + and logs now identify loaded and failed lists. +- Fixed proxy filtering and forwarding: upgrade requests now pass adblock and + DoH policy checks; the MMTLS tunnel no longer intercepts WebSocket handshakes; + truncated upstream bodies abort downstream responses; replacement resources + are decoded with their MIME types; IPv6 interception certificates carry IP + SANs; and CSP element directives receive the injection nonce. +- Userscript endpoints now require tokens bound to the script and its matched + page, preventing access to another script's storage or fetch permissions and + allowing path-scoped scripts to poll values and load resources. Disabling a + script or changing its rules so it no longer matches revokes access. Reload + open pages after upgrading to obtain the new tokens. +- Fixed the web UI dying at random after a reload (SIGHUP or saving + Network/PAC/Debug settings). The restarted web server raced the outgoing one + for port bind while the old listener was still draining connections; losing + the race left the UI down until the next reload. The frontend now tears down + and re-binds sequentially, the same way the proxy loop always has, and a + bind failure retries every 5 seconds instead of giving up. +- Userscript engine: Greasemonkey/Tampermonkey-style scripts injected into + matching pages, managed at runtime from the web UI. + - New **Settings → Userscripts** page: install a script by pasting it or by + URL (e.g. from Greasyfork), toggle scripts individually, edit a script's + source in place, and uninstall it. A master switch disables the whole + engine without clearing the per-script selection. Each entry shows its + version, `@run-at`, match patterns, grant count and `@noframes` state, and + a script whose stored body no longer parses is called out as not being + injected instead of failing silently. + - New `[userscripts]` configuration section holding the master `enabled` flag + and one `[[userscripts.scripts]]` entry per script. As with filter lists, + only metadata is stored in the configuration file; bodies live under + `userscripts/` in the configuration directory (override with + `PRIVAXY_USERSCRIPT_PATH`), keyed by a hash of the source URL so + re-installing the same script reuses its file. Configurations written + before this release parse unchanged and default to an enabled engine with + no scripts. + - Scripts are matched on the same canonical URL the adblock engine uses, + supporting `@match` (Chrome match-pattern syntax including `` and + `*.host` wildcards), `@include`/`@exclude` (globs, or regular expressions + written `/…/`), `@exclude-match`, `@run-at` + (`document-start`/`-body`/`-end`/`-idle`) and `@noframes`. Exclusions take + precedence over inclusions. A script declaring neither `@match` nor + `@include` — or with a malformed pattern or no metadata block — is rejected + with a `422` at install time rather than being stored and never firing. + - The in-page runtime provides `GM_info`, `unsafeWindow`, `GM_addStyle` + (nonce-stamped so it survives the page's CSP), `GM_log`, `GM_openInTab`, + `GM_setClipboard`, `GM_notification`, `GM_registerMenuCommand` and the + promise-based `GM.*` namespace. + - `@require` libraries and `@resource` payloads are fetched server-side and + cached on disk under `userscripts/assets/`, keyed by URL hash. Requires are + evaluated inside the script's own wrapper ahead of its body, so their + top-level declarations are visible to the script without leaking into the + page, and `GM_getResourceText`/`GM_getResourceURL` read the fetched + resources. Cached assets are never re-fetched (the convention is to pin a + versioned URL); delete the `assets` directory to refresh. An asset that + cannot be fetched degrades its script rather than dropping it, and the + failure is reported on the Userscripts page. + - `GM_setValue`/`GM_getValue`/`GM_deleteValue`/`GM_listValues` are persisted, + scoped per script, in `userscripts/gm_storage.json` (writes are coalesced + on a short debounce and written atomically; the configuration file is + deliberately not used, since these are written far too often to + re-serialize it each time). Because `GM_getValue` is synchronous in the GM + API, values are preloaded into each script's descriptor at injection time + and read from that snapshot in-page, so an ordinary `GM_getValue` costs no + request. Uninstalling a script drops its values. + - `GM_xmlhttpRequest` is relayed server-side, so it has no CORS restrictions + — the one capability a real content script cannot have. Three independent + controls gate it: a token bound to the script and page, the requesting script's own + `@connect` declarations (as Tampermonkey requires, so compatibility is + unaffected), and a filter rejecting loopback, RFC1918, carrier-grade NAT, + link-local (including the cloud metadata address) and IPv4-mapped + equivalents. Redirects are followed manually so `@connect` and address + filtering re-run on every hop rather than letting an allow-listed host + bounce the request to `127.0.0.1`. Methods are restricted, `Host` and + hop-by-hop request headers cannot be set, and responses are size-capped. + - `@resource` payloads may be binary. They are stored as bytes with the + content type they were served as; text small enough to matter is inlined + into the script's descriptor so `GM_getResourceText` stays synchronous, + while anything binary or oversized is reachable through + `GM_getResourceURL`, served from the reserved path with its original bytes, + content type and `X-Content-Type-Options: nosniff`. `GM_getResourceText` on + a binary resource returns `null` and logs a note pointing at + `GM_getResourceURL` rather than returning mojibake. + - `GM_addValueChangeListener`/`GM_removeValueChangeListener` are implemented. + Changes fire locally, reach other same-origin tabs over `BroadcastChannel` + (free, no request), and reach other origins and other devices behind the + same proxy by polling a read endpoint — which only runs while at least one + listener is registered, so a page with no listeners issues no extra + requests. The read endpoint requires the requesting URL to satisfy the + script's own `@match`/`@include`, so it can never reveal more than the + page's own descriptor already contained. + - `GM_registerMenuCommand` now has a real surface: a small floating menu, + injected only once a script actually registers a command, hosted in a closed + shadow root so neither the page's CSS nor Privaxy's can reach across. + Commands are still reachable from the console via + `__privaxyUserscriptMenu()`. + - Userscripts can be disabled for a single tab from that menu, backed by + `sessionStorage` — per-tab by construction, so the proxy needs no notion of + a tab. Other tabs are unaffected; `__privaxyUserscriptsEnableTab()` restores + them, since disabling removes the menu that turned them off. + - Userscripts installed from a URL are re-fetched on the same 24h timer as the + filter lists and recompiled in place, so upstream changes are picked up + without a restart. The refresh re-reads the configuration from disk rather + than reusing the updater's own copy: userscript changes deliberately bypass + that channel, so its copy is stale with respect to them and recompiling from + it would drop every script installed since startup. + - `@updateURL` and `@downloadURL` are honored, both defaulting to the URL the + script was installed from. When they differ, only the (small) `@updateURL` + document is fetched to compare `@version`, and the body is downloaded solely + when that version is newer — versions are ordered as dotted numbers, so + `1.2.10` correctly supersedes `1.2.9`, falling back to plain inequality for + schemes that cannot be ordered. Scripts that split metadata and body, a + common Greasyfork layout, previously re-downloaded the whole body on every + cycle. + - A **Check for updates** button on the Userscripts page refreshes on demand + instead of waiting out the timer, reporting per script whether it was + updated, already current, or failed and why. Unlike the periodic refresh it + holds the save lock, so a changed `@name` or `@version` is persisted. + - New `userscripts.allow_private_network_requests` setting (default off, with + a toggle on the Userscripts page) permits the relay to reach private + addresses. It is off by default because the relay runs server-side: the + proxy usually sits *inside* a LAN and can reach routers, admin panels and + metadata endpoints no page could contact. Changes apply immediately, with + no reload. + - Changes apply to the next page load with no reload or restart: compiled + scripts live in a shared store that each API mutation replaces in place, + and the store is also refreshed on `SIGHUP` so a hand-edited + `[userscripts]` section takes effect. Each script is emitted in its own + `nonce`d script element, so a syntax error in one script cannot abandon the + others or the ad-blocking payload, and the CSP nonce is kept in a closure + rather than published on `window`. + - Note that a userscript installed here runs on **every client behind the + proxy**, in the page's main world (a proxy has no isolated world to offer), + which is a wider blast radius than a browser extension installed in one + profile. The Userscripts page says so where scripts are added. + - **Not supported.** A userscript engine built into a proxy cannot reach full + Tampermonkey parity, and some of what is missing is structural rather than + unfinished. Known gaps, so a script that misbehaves can be diagnosed instead + of guessed at: + - *No isolated world, and there cannot be one.* Scripts run in the page's + main world, so `unsafeWindow === window`, page scripts can read and clobber + anything a userscript leaves reachable, and anti-adblock can detect the + injection. Each script is still wrapped in its own function, so its `var`, + `let`, `const`, `function` and `class` declarations do not leak to the page + — only an undeclared assignment or an explicit `window.x = …` does. + - *Pages the proxy never sees get nothing.* A site with an active service + worker serving navigations from cache, `file://`, `chrome://`, browser-cache + hits and any traffic not routed through Privaxy are all invisible to it, so + no script runs there. A browser extension sees all of them. + - *`@grant` is parsed and displayed but not enforced.* Every script receives + every implemented API regardless of what it declared, including + `@grant none`. This is deliberately forgiving — a script that forgot to + declare a grant still works — but it is a deviation. + - *Not implemented:* `GM_cookie` (the proxy has no cookie jar for the + browser's cookies; it only sees `Cookie` headers in flight), + `GM_getTab`/`GM_saveTab`/`GM_getTabs` (no tab identity exists on the proxy + side), `GM_download` (it would mean the proxy writing files to its own disk + on a page's behalf), `GM_addElement`, the batch `GM_setValues`/`GM_getValues` + forms, and `window.onurlchange`. + - *`GM_notification` writes to the console* rather than raising a real + notification, and `GM_setClipboard` needs a user gesture like any page-context + clipboard write. + - *Metadata ignored:* `@sandbox`, `@unwrap`, `@top-level-await`, `@icon`, + `@supportURL`, `@antifeature`. Unknown directives are skipped, not rejected. + - *`@resource` payloads are byte-exact but not inlined as text when binary or + over 256 KB* — `GM_getResourceText` returns `null` for those and the data is + reachable only through `GM_getResourceURL`. + - *`GM_xmlhttpRequest` is not a transparent `XMLHttpRequest`.* Responses are + decoded as lossy UTF-8, so binary bodies are unusable; `abort()` only + suppresses the callbacks, since the server-side request is already in + flight; there is no `onprogress`/`onreadystatechange`; redirects are capped + at 5 hops, timeouts at 60s (default 30s) and responses at 8 MB; and the + request only reaches hosts the script declared with `@connect`. + - *Value-change notification is not instant across origins.* Same-origin tabs + are updated immediately over `BroadcastChannel`; a change made on a + different origin or another device is picked up by a 15s poll, and only + while a listener is registered. + - *Per-tab disable is per-tab **per origin*** — it is `sessionStorage`, so + disabling on one site does not disable on another in the same tab. + - *Storage limits:* 1000 keys per script and 64 KB per value; a script body + or fetched `@require`/`@resource` is capped at 2 MB. Writes are flushed on a + 500 ms debounce, so values set immediately before a crash can be lost. + - *No script ordering or import/export in the UI.* Injection order is + configuration order, changeable only by editing the file. +- Proxy performance overhaul: + - *HTML responses now stream.* The proxy previously withheld an HTML + response — status line, headers and all — until the entire upstream + document had been downloaded and fed through the rewriter, so the browser + could not start parsing (or prefetching subresources) until the last + upstream byte arrived. The rewritten document now streams to the client as + it is produced, and the rewriter pipeline is bounded end-to-end, so a slow + client backpressures the upstream download instead of the whole document + buffering in memory. + - *WebSocket tunnels no longer squeeze through a 32-byte buffer.* The duplex + buffer bridging the client and upstream halves of an upgraded connection + was 32 bytes, forcing a task wakeup roughly every 32 bytes transferred; + it is now 64 KiB. + - *The adblock engine is shared, not funneled through one thread.* The + `single-thread` adblock feature is dropped; the engine (Send + Sync) is + now called directly from request tasks, removing a channel round-trip and + two cross-thread handoffs from every request. Matching itself still + serializes briefly on the engine's internal regex-manager lock — the same + one-core ceiling as the old blocker thread, far above proxy request rates + — but the per-request overhead around it is gone. Filter-list updates + build the replacement engine on the blocking pool and swap it in + atomically, so requests keep matching against the old engine during a + multi-second list rebuild instead of stalling behind it. + - *One cosmetic lookup per page instead of two.* The URL-scoped cosmetic + lookup (`url_cosmetic_resources`) ran once for the `` injection and + again at end-of-body; the end-of-body pass now reuses the first lookup and + only resolves the generic class/id-indexed selectors on top. + - Dashboard events are only constructed when a client is actually watching + the live requests feed; statistics counters are atomics instead of + mutexes; the HTML rewriter no longer compiles a (redundant) regex per + response and scans each element once instead of twice. + - New 5-minute read timeout on proxied requests bounds a peer that stops + sending mid-response without closing (previously such a request hung + forever); generous enough not to disturb long-polls or quiet SSE streams. +- A configuration file that fails to parse no longer takes the server down. + `read_configuration` unwrapped the parse error, so a hand-edited file with (for + example) a duplicate TOML key panicked a worker on `SIGHUP` and killed both the + proxy and web-UI loops while the process kept running — both ports stopped + listening with no way back except a restart. The last configuration that parsed + is now kept and reused, so a reload over a broken file logs the error and + carries on serving with the previous settings, then picks up the corrected file + on the next reload. The CA reload in the same path no longer unwraps either. +- The PAC route now also answers at `/wpad.dat`, so DNS-based WPAD + auto-discovery (`http://wpad./wpad.dat`) can point straight + at Privaxy without needing a rewrite in a fronting reverse proxy. +- New `network.gui_url` setting: full base URL of the web GUI as reachable by + clients, e.g. `gui_url = "http://proxy.example.lan"` when the GUI sits + behind a reverse proxy. Used verbatim for links back to the GUI on proxy + error pages (the "exclude this host" button), winning over `listen_url` and + the bound/dialed address. Fixes the exclude link pointing at an unreachable + container IP when Privaxy runs behind Docker NAT with the GUI fronted by a + reverse proxy on a different port. Editable from Settings → General + (network section) as "GUI URL"; must start with `http://` or `https://` + (validated in both the form and the API), and clearing the field unsets it. + Older API clients that omit the field keep the stored value. +- Fix PAC rendering of CIDR bypass rules entered as `subnet/22`: the GUI + stores the bare prefix length, which was emitted verbatim into + `isInNet(host, subnet, "22")` — an invalid mask for standard PAC engines, + so those DIRECT rules silently never matched. Prefix lengths are now + converted to dotted-decimal masks at render time (already-dotted masks are + passed through), fixing existing configs without rewriting them. +- Failing filter lists are now surfaced in the web UI + - Filter lists that fail to download or stop serving valid rules (moved + URL, HTML error page, empty list) used to fail silently in the background + updater. Settings → Filters now shows a warning panel listing each + failing list with its error, last attempt time and consecutive failure + count, and offers per-entry **Edit** (fix the URL, title or category in a + prefilled modal) and **Remove** actions. The panel is hidden while every + list is healthy. Failures are tracked in memory (keyed by the filter's + file name) and reconciled on configuration changes, so disabling or + removing a list clears its entry. + - Editing validates the new URL the same way adding a filter does (must + serve a `text/plain` list with parseable rules) and keeps the entry's + enabled state; a URL already used by another filter is rejected with a + `409`. + - A periodic refresh no longer aborts the remaining lists when one list + fails to download: each list is now updated independently and failures + are recorded per list. + - New authenticated API routes: `GET /api/filters/failures` and + `PATCH /api/filters`. `/api/filters` routes now match the exact path + only, so stray sub-paths 404 instead of hitting the collection handlers. +- User-added filter lists can be edited and removed from the Filters page + - Each user-added list row now has an edit (pencil) button opening a modal + to rename the list, change its category or URL, or delete it. Built-in + lists shipped with the package show no edit button and the API refuses to + edit (`PATCH`) or remove (`DELETE`) them with a `403` — they can only be + enabled/disabled. The failures panel follows the same rule: a failing + built-in list offers a **Disable** action instead of Edit/Remove. + - `GET /api/filters` responses now include each filter's `url` and an + `is_default` flag, and `GET /api/filters/failures` entries carry + `is_default` too. +- Dependency upgrade to latest versions (semver-aware; pre-releases such as + `argon2 0.6.0-rc` and `tera 2.0.0-alpha` were intentionally not adopted). + - Server HTTP/TLS stack: `hyper 0.14 → 1`, `http 0.2 → 1` (now via + `hyper-util` + `http-body-util`), `rustls 0.21 → 0.23`, + `tokio-rustls 0.24 → 0.26`, `hyper-rustls 0.24 → 0.27`, + `reqwest 0.11 → 0.13`, `warp 0.3 → 0.4`. The whole TLS stack is pinned to + the `ring` crypto provider so the MIPS/musl cross builds keep working + (`aws-lc-rs` needs a C toolchain). A `ring` `CryptoProvider` is installed + once at startup, as rustls 0.23 requires. + - warp 0.4 dropped its built-in TLS and graceful-shutdown server, so the web + GUI is now served through `hyper-util` with optional `tokio-rustls` + termination; WebSocket live feeds continue to work via connection upgrades. + - Frontend: `yew 0.19 → 0.23`, `yew-router 0.16 → 0.20`, `gloo-*` bumped, + `web-sys`/`wasm-bindgen` refreshed, and the deprecated `reqwasm` replaced + with `gloo-net`. + - Other majors: `thiserror 1 → 2`, `toml 0.8 → 1`, `dirs 5 → 6`. + - Behavior is unchanged; a set of characterization tests was added first to + lock the proxy's CSP/request-type/upgrade logic, the TOML config + round-trip, and CA-signed cert/server-config assembly. +- One-click exclusion of hosts that break under TLS interception + - The proxy's 502 error page now names the failing host and offers an + "Exclude this host" button. The button is a plain link to the web UI's new + `/exclude?host=…` confirm page, so it rides the existing session auth: + logged-in admins get a one-click confirm, everyone else lands on the login + page first (the URL survives login). Values substituted into the error + page are now HTML-escaped and the link's host is percent-encoded + (previously the error reason was inserted unescaped). + - The web UI address on the error page is derived from `network.listen_url` + when set, otherwise from the bind address — falling back to the IP the + client actually dialed when binding `0.0.0.0`. + - New "Recent TLS interception failures" panel on Settings → Exclusions: + clients that abort the interception handshake (typically certificate + pinning — e.g. banking apps, RCS messaging) can never be shown an error + page, so the proxy now records those hosts (deduplicated, + most-recent-first, capped at 100, in memory) and the panel offers + per-host **Exclude** and **Ignore** actions. Ignored hosts persist in the + config (`ignored_tls_failures`) and survive restarts; existing config + files without the field keep working. + - New authenticated API routes: `GET /api/tls-failures` and + `POST /api/tls-failures/ignore`. + ## v0.7.1 - Fix WebSocket / protocol-upgrade connections hanging diff --git a/Cargo.lock b/Cargo.lock index 14db423..0ffb544 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,10 +10,10 @@ checksum = "db6fe7702c798519299bcbe011ff6f1dc9e3aedc1f3171178cddf71e1736bf95" dependencies = [ "addr", "arrayvec", - "base64 0.22.1", - "bitflags 2.11.1", + "base64", + "bitflags 2.13.0", "flatbuffers", - "idna 1.1.0", + "idna", "itertools", "memchr", "percent-encoding", @@ -23,7 +23,7 @@ dependencies = [ "seahash", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "url", ] @@ -38,25 +38,16 @@ dependencies = [ ] [[package]] -name = "addr2line" -version = "0.21.0" +name = "adler2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "ahash" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", "once_cell", @@ -66,9 +57,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -88,18 +79,6 @@ dependencies = [ "alloc-no-stdlib", ] -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -111,9 +90,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", "anstyle-parse", @@ -126,36 +105,37 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "once_cell_polyfill", + "windows-sys 0.61.2", ] [[package]] @@ -172,34 +152,32 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "async-compression" -version = "0.4.11" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd066d0b4ef8ecb03a55319dc13aa6910616d0f44008a045bb1835af830abff5" +checksum = "e79b3f8a79cccc2898f31920fc69f304859b3bd567490f75ebf51ae1c792a9ac" dependencies = [ - "brotli", - "flate2", - "futures-core", + "compression-codecs", + "compression-core", "futures-io", - "memchr", "pin-project-lite", "tokio", ] [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] @@ -210,30 +188,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" - -[[package]] -name = "backtrace" -version = "0.3.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.21.7" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "base64" @@ -247,6 +204,15 @@ version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -255,9 +221,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.11.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" +checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" dependencies = [ "serde_core", ] @@ -280,17 +246,11 @@ dependencies = [ "generic-array", ] -[[package]] -name = "boolinator" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfa8873f51c92e232f9bac4065cddef41b714152812bfc5f7672ba16d6ef8cd9" - [[package]] name = "brotli" -version = "6.0.0" +version = "8.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" +checksum = "8119e4516436f5708bbc474a9d395bf12f1b5395e93a92a56e647ac3388c8610" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -299,14 +259,23 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6221fe77a248b9117d431ad93761222e1cf8ff282d9d1d5d9f53d6299a1cf76" +checksum = "5962523e1b92ce1b5e793d9169b9943eece10d39f62550bc04bb605d75b94924" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", ] +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + [[package]] name = "bstr" version = "1.12.1" @@ -319,9 +288,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "byteorder" @@ -331,42 +300,73 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cc" -version = "1.0.98" +version = "1.2.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "dad887fd958be91b5098c0248def011f4523ab786cd411be668777e55063501f" +dependencies = [ + "find-msvc-tools", + "shlex", +] [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-link", ] [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "compression-codecs" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf" +dependencies = [ + "brotli", + "compression-core", + "flate2", + "memchr", +] + +[[package]] +name = "compression-core" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789" [[package]] name = "console_error_panic_hook" @@ -386,9 +386,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.9.4" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" dependencies = [ "core-foundation-sys", "libc", @@ -396,37 +396,28 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" version = "0.8.6" @@ -448,15 +439,15 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", "typenum", @@ -486,14 +477,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] name = "darling" -version = "0.20.9" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" dependencies = [ "darling_core", "darling_macro", @@ -501,56 +492,55 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" dependencies = [ - "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ "darling_core", "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] name = "data-encoding" -version = "2.6.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" [[package]] name = "deranged" -version = "0.3.11" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ "powerfmt", - "serde", + "serde_core", ] [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.117", ] [[package]] @@ -566,71 +556,77 @@ dependencies = [ [[package]] name = "dirs" -version = "5.0.1" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ "dirs-sys", ] [[package]] name = "dirs-sys" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] name = "dtoa" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" [[package]] name = "dtoa-short" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbaceec3c6e4211c79e7b1800fb9680527106beb2f9c51904a3210c03a448c74" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" dependencies = [ "dtoa", ] +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + [[package]] name = "either" -version = "1.12.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] [[package]] name = "env_filter" -version = "0.1.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef" dependencies = [ "log", "regex", @@ -638,39 +634,33 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.3" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a" dependencies = [ "anstream", "anstyle", "env_filter", - "humantime", + "jiff", "log", ] [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] -[[package]] -name = "fastrand" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" - [[package]] name = "filterlists-api" version = "0.1.0" @@ -678,27 +668,33 @@ dependencies = [ "async-trait", "readonly", "reqwasm", - "reqwest 0.12.4", + "reqwest", "serde", "serde_json", - "thiserror", + "thiserror 2.0.18", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + [[package]] name = "flatbuffers" version = "25.12.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.13.0", "rustc_version", ] [[package]] name = "flate2" -version = "1.0.30" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", "miniz_oxide", @@ -727,18 +723,18 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] [[package]] name = "futures" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" dependencies = [ "futures-channel", "futures-core", @@ -751,9 +747,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", "futures-sink", @@ -761,15 +757,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" dependencies = [ "futures-core", "futures-task", @@ -778,38 +774,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-channel", "futures-core", @@ -819,7 +815,6 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] @@ -855,20 +850,28 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", + "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] -name = "gimli" -version = "0.28.1" +name = "getrandom" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] [[package]] name = "globset" @@ -889,34 +892,37 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.13.0", "ignore", "walkdir", ] [[package]] name = "gloo" -version = "0.4.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23947965eee55e3e97a5cd142dd4c10631cc349b48cecca0ed230fd296f568cd" +checksum = "d15282ece24eaf4bd338d73ef580c6714c8615155c4190c781290ee3fa0fd372" dependencies = [ "gloo-console", "gloo-dialogs", "gloo-events", "gloo-file", + "gloo-history", + "gloo-net 0.5.0", "gloo-render", "gloo-storage", - "gloo-timers", - "gloo-utils", + "gloo-timers 0.3.0", + "gloo-utils 0.2.0", + "gloo-worker", ] [[package]] name = "gloo-console" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b7ce3c05debe147233596904981848862b068862e9ec3e34be446077190d3f" +checksum = "2a17868f56b4a24f677b17c8cb69958385102fa879418052d60b50bc1727e261" dependencies = [ - "gloo-utils", + "gloo-utils 0.2.0", "js-sys", "serde", "wasm-bindgen", @@ -925,9 +931,9 @@ dependencies = [ [[package]] name = "gloo-dialogs" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67062364ac72d27f08445a46cab428188e2e224ec9e37efdba48ae8c289002e6" +checksum = "bf4748e10122b01435750ff530095b1217cf6546173459448b83913ebe7815df" dependencies = [ "wasm-bindgen", "web-sys", @@ -935,9 +941,9 @@ dependencies = [ [[package]] name = "gloo-events" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b107f8abed8105e4182de63845afcc7b69c098b7852a813ea7462a320992fc" +checksum = "27c26fb45f7c385ba980f5fa87ac677e363949e065a083722697ef1b2cc91e41" dependencies = [ "wasm-bindgen", "web-sys", @@ -945,9 +951,9 @@ dependencies = [ [[package]] name = "gloo-file" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d5564e570a38b43d78bdc063374a0c3098c4f0d64005b12f9bbe87e869b6d7" +checksum = "97563d71863fb2824b2e974e754a81d19c4a7ec47b09ced8a0e6656b6d54bd1f" dependencies = [ "futures-channel", "gloo-events", @@ -956,6 +962,23 @@ dependencies = [ "web-sys", ] +[[package]] +name = "gloo-history" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "903f432be5ba34427eac5e16048ef65604a82061fe93789f2212afc73d8617d6" +dependencies = [ + "getrandom 0.2.17", + "gloo-events", + "gloo-utils 0.2.0", + "serde", + "serde-wasm-bindgen", + "serde_urlencoded", + "thiserror 1.0.69", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "gloo-net" version = "0.1.0" @@ -965,140 +988,234 @@ dependencies = [ "futures-channel", "futures-core", "futures-sink", - "gloo-utils", + "gloo-utils 0.1.7", "js-sys", "pin-project", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", ] [[package]] -name = "gloo-render" -version = "0.1.1" +name = "gloo-net" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd9306aef67cfd4449823aadcd14e3958e0800aa2183955a309112a84ec7764" +checksum = "43aaa242d1239a8822c15c645f02166398da4f8b5c4bae795c1f5b44e9eee173" dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils 0.2.0", + "http 0.2.12", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror 1.0.69", "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", ] [[package]] -name = "gloo-storage" -version = "0.2.2" +name = "gloo-net" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6ab60bf5dbfd6f0ed1f7843da31b41010515c745735c970e821945ca91e480" +checksum = "c06f627b1a58ca3d42b45d6104bf1e1a03799df472df00988b6ba21accc10580" dependencies = [ - "gloo-utils", + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils 0.2.0", + "http 1.4.2", "js-sys", + "pin-project", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", ] [[package]] -name = "gloo-timers" -version = "0.2.6" +name = "gloo-render" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +checksum = "56008b6744713a8e8d98ac3dcb7d06543d5662358c9c805b4ce2167ad4649833" dependencies = [ - "futures-channel", - "futures-core", - "js-sys", "wasm-bindgen", + "web-sys", ] [[package]] -name = "gloo-utils" -version = "0.1.7" +name = "gloo-storage" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" +checksum = "fbc8031e8c92758af912f9bc08fbbadd3c6f3cfcbf6b64cdf3d6a81f0139277a" dependencies = [ + "gloo-utils 0.2.0", "js-sys", "serde", "serde_json", + "thiserror 1.0.69", "wasm-bindgen", "web-sys", ] [[package]] -name = "h2" -version = "0.3.26" +name = "gloo-timers" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" dependencies = [ - "bytes", - "fnv", + "futures-channel", "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.2.6", - "slab", - "tokio", - "tokio-util", - "tracing", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "h2" -version = "0.4.5" +name = "gloo-timers" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "482ce8a491a501da4cd806bd190275363d674f2845005c6ddbd5d3e1dd54495d" dependencies = [ - "atomic-waker", - "bytes", - "fnv", + "futures-channel", "futures-core", - "futures-sink", - "http 1.1.0", - "indexmap 2.2.6", - "slab", - "tokio", - "tokio-util", - "tracing", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "hashbrown" -version = "0.12.3" +name = "gloo-utils" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] [[package]] -name = "hashbrown" -version = "0.13.2" +name = "gloo-utils" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" dependencies = [ - "ahash", + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", ] [[package]] -name = "hashbrown" -version = "0.14.5" +name = "gloo-utils" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "4202275d95a142fa209a1e35e91c250a710c5600731372cd3464a39ed01573d6" dependencies = [ - "ahash", - "allocator-api2", + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", ] [[package]] -name = "headers" -version = "0.3.9" +name = "gloo-worker" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" +checksum = "085f262d7604911c8150162529cefab3782e91adb20202e8658f7275d2aefe5d" dependencies = [ - "base64 0.21.7", - "bytes", + "bincode", + "futures", + "gloo-utils 0.2.0", + "gloo-worker-macros", + "js-sys", + "pinned", + "serde", + "thiserror 1.0.69", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-worker-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956caa58d4857bc9941749d55e4bd3000032d8212762586fa5705632967140e7" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "h2" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "171fefbc92fe4a4de27e0698d6a5b392d6a0e333506bc49133760b3bcf948733" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.4.2", + "indexmap 2.14.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "headers" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" +dependencies = [ + "base64", + "bytes", "headers-core", - "http 0.2.12", + "http 1.4.2", "httpdate", "mime", "sha1", @@ -1106,18 +1223,18 @@ dependencies = [ [[package]] name = "headers-core" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "http 0.2.12", + "http 1.4.2", ] [[package]] name = "hermit-abi" -version = "0.3.9" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hex" @@ -1142,59 +1259,47 @@ checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", - "itoa 1.0.11", + "itoa 1.0.18", ] [[package]] name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa 1.0.11", -] - -[[package]] -name = "http-body" -version = "0.4.6" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" dependencies = [ "bytes", - "http 0.2.12", - "pin-project-lite", + "itoa 1.0.18", ] [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.1.0", + "http 1.4.2", ] [[package]] name = "http-body-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", + "futures-core", + "http 1.4.2", + "http-body", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "httpdate" @@ -1202,50 +1307,22 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "hyper" -version = "0.14.29" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" dependencies = [ + "atomic-waker", "bytes", "futures-channel", "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", + "h2", + "http 1.4.2", + "http-body", "httparse", "httpdate", - "itoa 1.0.11", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.0", - "httparse", - "itoa 1.0.11", + "itoa 1.0.18", "pin-project-lite", "smallvec", "tokio", @@ -1254,79 +1331,55 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.2" +version = "0.27.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.29", + "http 1.4.2", + "hyper", + "hyper-util", "log", - "rustls 0.21.12", + "rustls", "rustls-native-certs", "tokio", - "tokio-rustls 0.24.1", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper 0.14.29", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper 1.3.1", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", + "tokio-rustls", "tower-service", ] [[package]] name = "hyper-util" -version = "0.1.5" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ + "base64", "bytes", "futures-channel", "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "hyper 1.3.1", + "http 1.4.2", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.4", "tokio", - "tower", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", "windows-core", ] @@ -1428,16 +1481,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "1.1.0" @@ -1461,9 +1504,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.25" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a" +checksum = "b915661dd01db3f05050265b2477bcc6527b3792388e2749b41623cc592be67d" dependencies = [ "crossbeam-deque", "globset", @@ -1475,20 +1518,40 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "implicit-clone" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1689b939ee35e3a075b0834b5672efd43aec8a6e81a1c6002b76a5ca2f211ae0" +dependencies = [ + "implicit-clone-derive", + "indexmap 2.14.0", +] + +[[package]] +name = "implicit-clone-derive" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "699c1b6d335e63d0ba5c1e1c7f647371ce989c3bcbe1f7ed2b85fa56e3bd1a21" +dependencies = [ + "quote", + "syn 2.0.117", +] + [[package]] name = "include_dir" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" dependencies = [ "include_dir_macros", ] [[package]] name = "include_dir_macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" dependencies = [ "proc-macro2", "quote", @@ -1507,26 +1570,27 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.17.1", "serde", + "serde_core", ] [[package]] name = "ipnet" -version = "2.9.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itertools" @@ -1545,24 +1609,99 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jiff" +version = "0.2.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4603d3033e49e2b0e31229fcab20a5d40089c607d975cd9c80551dc69eed9102" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", +] + +[[package]] +name = "jiff-static" +version = "0.2.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "782d32378dddf207193ac91cefb848ad41abb58195c95168e1291227a0832b47" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys", + "log", + "simd_cesu8", + "thiserror 2.0.18", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.117", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.117", +] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "03d04c30968dffe80775bd4d7fb676131cd04a1fb46d2686dbffbaec2d9dfd31" dependencies = [ + "cfg-if", + "futures-util", "wasm-bindgen", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lazycell" @@ -1572,26 +1711,19 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libredox" -version = "0.1.3" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "f02ab6bace2054fb888a3c16f990117b579d14a3088e472d63c6011fa185c9d3" dependencies = [ - "bitflags 2.11.1", "libc", ] -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - [[package]] name = "litemap" version = "0.8.2" @@ -1600,19 +1732,18 @@ checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" dependencies = [ - "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.21" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a" [[package]] name = "lol_html" @@ -1620,7 +1751,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4629ff9c2deeb7aad9b2d0f379fc41937a02f3b739f007732c46af40339dee5" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.13.0", "cfg-if", "cssparser", "encoding_rs", @@ -1630,7 +1761,7 @@ dependencies = [ "memchr", "mime", "selectors", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1641,9 +1772,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "memchr" -version = "2.7.2" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" [[package]] name = "mime" @@ -1653,9 +1784,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -1663,58 +1794,23 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ - "adler", + "adler2", + "simd-adler32", ] [[package]] name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", -] - -[[package]] -name = "multer" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" -dependencies = [ - "bytes", - "encoding_rs", - "futures-util", - "http 0.2.12", - "httparse", - "log", - "memchr", - "mime", - "spin", - "version_check", -] - -[[package]] -name = "native-tls" -version = "0.2.11" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "02bd0af71c67b473010cbbc60715ee815645a4dc942899111f494b4b737d6fda" dependencies = [ - "lazy_static", "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.61.2", ] [[package]] @@ -1725,9 +1821,9 @@ checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" [[package]] name = "num-format" @@ -1736,7 +1832,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ "arrayvec", - "itoa 1.0.11", + "itoa 1.0.18", ] [[package]] @@ -1750,40 +1846,36 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ "hermit-abi", "libc", ] [[package]] -name = "object" -version = "0.32.2" +name = "once_cell" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] -name = "once_cell" -version = "1.19.0" +name = "once_cell_polyfill" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.13.0", "cfg-if", "foreign-types", "libc", - "once_cell", "openssl-macros", "openssl-sys", ] @@ -1796,29 +1888,29 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] name = "openssl-src" -version = "300.3.0+3.3.0" +version = "300.6.1+3.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba8804a1c5765b18c4b3f907e6897ebabeedebc9830e1a0046c4a4cf44663e1" +checksum = "46eb8fb9fb3b61ce1c0f8a026c4c1a0714d3a9e138e7fbde78753ce2babc3846" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695" dependencies = [ "cc", "libc", @@ -1835,9 +1927,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", "parking_lot_core", @@ -1845,15 +1937,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-link", ] [[package]] @@ -1869,9 +1961,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" @@ -1903,7 +1995,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] @@ -1972,41 +2064,61 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] -name = "pin-utils" +name = "pinned" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "a829027bd95e54cfe13e3e258a1ae7b645960553fb82b75ff852c29688ee595b" +dependencies = [ + "futures", + "rustversion", + "thiserror 1.0.69", +] [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + +[[package]] +name = "portable-atomic-util" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" +dependencies = [ + "portable-atomic", +] [[package]] name = "potential_utf" @@ -2025,9 +2137,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -2035,45 +2150,62 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.117", +] + [[package]] name = "privaxy" -version = "0.7.1" +version = "0.8.0" dependencies = [ "adblock", "argon2", "async-compression", - "base64 0.22.1", + "base64", + "bytes", "chrono", - "crossbeam-channel", "dirs", "env_logger", "filterlists-api", "futures", "futures-util", + "getrandom 0.3.4", "hex", "hmac", - "http 0.2.12", - "hyper 0.14.29", + "http 1.4.2", + "http-body-util", + "hyper", "hyper-rustls", + "hyper-util", "include_dir", "lazy_static", + "libc", "log", "lol_html", "mime_guess", "once_cell", "openssl", + "portable-atomic", "regex", - "reqwest 0.11.27", - "rustls 0.21.12", + "reqwest", + "rustls", "serde", "serde-tuple-vec-map", "serde_json", "serde_with", "sha2", + "socket2 0.5.10", "tera", - "thiserror", + "thiserror 2.0.18", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls", + "tokio-stream", "tokio-util", "toml", "uluru", @@ -2082,6 +2214,16 @@ dependencies = [ "wildmatch", ] +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -2114,18 +2256,18 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.84" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "psl" -version = "2.1.40" +version = "2.1.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13bff377588788655a4707bed4c2c1a5ff8dc169617f616ca3d0fdd56100baf" +checksum = "04e78830163eebdf905adb55ba26ba9b3ba554b08bd84c2fbe3b643c8addf22c" dependencies = [ "psl-types", ] @@ -2145,6 +2287,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "rand" version = "0.7.3" @@ -2161,13 +2309,12 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.5" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "rand_chacha 0.9.0", + "rand_core 0.9.5", ] [[package]] @@ -2182,12 +2329,12 @@ dependencies = [ [[package]] name = "rand_chacha" -version = "0.3.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", + "rand_core 0.9.5", ] [[package]] @@ -2205,7 +2352,16 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", ] [[package]] @@ -2228,40 +2384,60 @@ dependencies = [ [[package]] name = "readonly" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25d631e41bfb5fdcde1d4e2215f62f7f0afa3ff11e26563765bd6ea1d229aeb" +checksum = "f2a62d85ed81ca5305dc544bd42c8804c5060b78ffa5ad3c64b0fb6a8c13d062" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.13.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.17", "libredox", - "thiserror", + "thiserror 2.0.18", +] + +[[package]] +name = "ref-cast" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", ] [[package]] name = "regex" -version = "1.12.3" +version = "1.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba" dependencies = [ "aho-corasick", "memchr", @@ -2282,9 +2458,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "reqwasm" @@ -2292,109 +2468,61 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b89870d729c501fa7a68c43bf4d938bbb3a8c156d333d90faa0e8b3e3212fb" dependencies = [ - "gloo-net", + "gloo-net 0.1.0", ] [[package]] name = "reqwest" -version = "0.11.27" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ - "async-compression", - "base64 0.21.7", + "base64", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.29", + "h2", + "http 1.4.2", + "http-body", + "http-body-util", + "hyper", "hyper-rustls", - "hyper-tls 0.5.0", - "ipnet", + "hyper-util", "js-sys", "log", "mime", - "native-tls", - "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier", "serde", "serde_json", - "serde_urlencoded", "sync_wrapper", - "system-configuration", "tokio", - "tokio-native-tls", - "tokio-rustls 0.24.1", + "tokio-rustls", "tokio-util", + "tower", + "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots", - "winreg 0.50.0", -] - -[[package]] -name = "reqwest" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" -dependencies = [ - "base64 0.22.1", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.0", - "http-body-util", - "hyper 1.3.1", - "hyper-tls 0.6.0", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls-pemfile 2.1.2", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg 0.52.0", ] [[package]] name = "ring" -version = "0.17.8" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.15", + "getrandom 0.2.17", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] @@ -2405,12 +2533,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - [[package]] name = "rustc-hash" version = "1.1.0" @@ -2419,115 +2541,98 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] -[[package]] -name = "rustix" -version = "0.38.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" -dependencies = [ - "bitflags 2.11.1", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - [[package]] name = "rustls" -version = "0.21.12" +version = "0.23.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring", - "rustls-webpki 0.101.7", - "sct", -] - -[[package]] -name = "rustls" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" dependencies = [ "log", + "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.4", + "rustls-webpki", "subtle", "zeroize", ] [[package]] name = "rustls-native-certs" -version = "0.6.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.4", + "rustls-pki-types", "schannel", "security-framework", ] [[package]] -name = "rustls-pemfile" -version = "1.0.4" +name = "rustls-pki-types" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" dependencies = [ - "base64 0.21.7", + "zeroize", ] [[package]] -name = "rustls-pemfile" -version = "2.1.2" +name = "rustls-platform-verifier" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" dependencies = [ - "base64 0.22.1", - "rustls-pki-types", + "core-foundation", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", ] [[package]] -name = "rustls-pki-types" -version = "1.7.0" +name = "rustls-platform-verifier-android" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.101.7" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "ring", + "rustls-pki-types", "untrusted", ] [[package]] -name = "rustls-webpki" -version = "0.102.4" +name = "rustversion" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" [[package]] name = "same-file" @@ -2540,40 +2645,48 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] -name = "scoped-tls" -version = "1.0.1" +name = "schemars" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] [[package]] -name = "scoped-tls-hkt" -version = "0.1.4" +name = "schemars" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ddc765d3410d9f6c6ca071bf0b67f6b01e3ec4595dc3892f02677e75819dddc" +checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] [[package]] -name = "scopeguard" -version = "1.2.0" +name = "scoped-tls" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] -name = "sct" -version = "0.7.1" +name = "scopeguard" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "seahash" @@ -2583,11 +2696,11 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "security-framework" -version = "2.11.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.13.0", "core-foundation", "core-foundation-sys", "libc", @@ -2596,9 +2709,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" dependencies = [ "core-foundation-sys", "libc", @@ -2626,9 +2739,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" @@ -2651,11 +2764,10 @@ dependencies = [ [[package]] name = "serde-wasm-bindgen" -version = "0.3.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "618365e8e586c22123d692b72a7d791d5ee697817b65a218cdf12a98870af0f7" +checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" dependencies = [ - "fnv", "js-sys", "serde", "wasm-bindgen", @@ -2678,7 +2790,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] @@ -2687,7 +2799,7 @@ version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ - "itoa 1.0.11", + "itoa 1.0.18", "memchr", "serde", "serde_core", @@ -2696,11 +2808,11 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.6" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -2710,24 +2822,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.11", + "itoa 1.0.18", "ryu", "serde", ] [[package]] name = "serde_with" -version = "3.8.1" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" dependencies = [ - "base64 0.22.1", + "base64", + "bs58", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.6", - "serde", - "serde_derive", + "indexmap 2.14.0", + "schemars 0.9.0", + "schemars 1.2.1", + "serde_core", "serde_json", "serde_with_macros", "time", @@ -2735,14 +2849,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.8.1" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] @@ -2768,24 +2882,53 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", "digest", ] +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] +[[package]] +name = "simd-adler32" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" + +[[package]] +name = "simd_cesu8" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f90157bb87cddf702797c5dadfa0be7d266cdf49e22da2fcaa32eff75b2c33" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + [[package]] name = "siphasher" version = "0.3.11" @@ -2794,40 +2937,41 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" -version = "1.13.2" +version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", "windows-sys 0.52.0", ] [[package]] -name = "spin" -version = "0.9.8" +name = "socket2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "strsim" @@ -2837,9 +2981,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -2854,9 +2998,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.87" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -2865,9 +3009,12 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "0.1.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] [[package]] name = "synstructure" @@ -2877,40 +3024,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys 0.52.0", + "syn 2.0.117", ] [[package]] @@ -2937,50 +3051,70 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl 2.0.18", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn 2.0.117", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] name = "time" -version = "0.3.36" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", - "itoa 1.0.11", + "itoa 1.0.18", "num-conv", "powerfmt", - "serde", + "serde_core", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", @@ -2998,9 +3132,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" dependencies = [ "tinyvec_macros", ] @@ -3013,70 +3147,58 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" dependencies = [ - "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.6.4", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", + "syn 2.0.117", ] [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls 0.21.12", + "rustls", "tokio", ] [[package]] -name = "tokio-rustls" -version = "0.25.0" +name = "tokio-stream" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" dependencies = [ - "rustls 0.22.4", - "rustls-pki-types", + "futures-core", + "pin-project-lite", "tokio", ] [[package]] name = "tokio-tungstenite" -version = "0.21.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" +checksum = "8f72a05e828585856dacd553fba484c242c46e391fb0e58917c942ee9202915c" dependencies = [ "futures-util", "log", @@ -3086,98 +3208,172 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", "futures-io", "futures-sink", "futures-util", - "hashbrown 0.14.5", + "hashbrown 0.15.5", "pin-project-lite", "slab", "tokio", ] +[[package]] +name = "tokise" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba44a1b36f42a95bd21b5e4acc1468547f75a73e7cf619312408d1f74c7fb687" +dependencies = [ + "futures", + "gloo", + "num_cpus", + "once_cell", + "pin-project", + "pinned", + "tokio", + "tokio-stream", + "wasm-bindgen-futures", +] + [[package]] name = "toml" -version = "0.8.13" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" +checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" dependencies = [ - "serde", + "indexmap 2.14.0", + "serde_core", "serde_spanned", - "toml_datetime", - "toml_edit", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.3", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ - "serde", + "serde_core", ] [[package]] name = "toml_edit" -version = "0.22.13" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", + "indexmap 2.14.0", + "toml_datetime 0.6.11", + "winnow 0.5.40", +] + +[[package]] +name = "toml_parser" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" +dependencies = [ + "winnow 1.0.3", ] +[[package]] +name = "toml_writer" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" + [[package]] name = "tower" -version = "0.4.13" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", - "pin-project", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "async-compression", + "bitflags 2.13.0", + "bytes", + "futures-core", + "futures-util", + "http 1.4.2", + "http-body", + "http-body-util", "pin-project-lite", "tokio", + "tokio-util", + "tower", "tower-layer", "tower-service", + "url", ] [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "log", "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", ] @@ -3190,28 +3386,25 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" -version = "0.21.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" +checksum = "6c01152af293afb9c7c2a57e4b559c5620b421f6d133261c60dd2d0cdb38e6b8" dependencies = [ - "byteorder", "bytes", "data-encoding", - "http 1.1.0", + "http 1.4.2", "httparse", "log", - "rand 0.8.5", + "rand 0.9.4", "sha1", - "thiserror", - "url", - "utf-8", + "thiserror 2.0.18", ] [[package]] name = "typenum" -version = "1.17.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "ucd-trie" @@ -3230,39 +3423,21 @@ dependencies = [ [[package]] name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.13.2" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" [[package]] name = "untrusted" @@ -3272,20 +3447,21 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna", "percent-encoding", + "serde", ] [[package]] -name = "utf-8" -version = "0.7.6" +name = "urlencoding" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "utf8_iter" @@ -3295,9 +3471,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "vcpkg" @@ -3307,9 +3483,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" @@ -3332,29 +3508,28 @@ dependencies = [ [[package]] name = "warp" -version = "0.3.7" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4378d202ff965b011c64817db11d5829506d3404edeadb61f190d111da3f231c" +checksum = "c0a808122a8a77eecdabaefd88ddb1913c4be5ea1465399f63ba64c7aa705fea" dependencies = [ "bytes", - "futures-channel", "futures-util", "headers", - "http 0.2.12", - "hyper 0.14.29", + "http 1.4.2", + "http-body", + "http-body-util", + "hyper", + "hyper-util", "log", "mime", "mime_guess", - "multer", "percent-encoding", "pin-project", - "rustls-pemfile 2.1.2", "scoped-tls", "serde", "serde_json", "serde_urlencoded", "tokio", - "tokio-rustls 0.25.0", "tokio-tungstenite", "tokio-util", "tower-service", @@ -3369,54 +3544,49 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "wasm-bindgen" -version = "0.2.92" +name = "wasip2" +version = "1.0.4+wasi-0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" dependencies = [ - "cfg-if", - "serde", - "serde_json", - "wasm-bindgen-macro", + "wit-bindgen", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" +name = "wasm-bindgen" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "8ddb3f79143bced6de84270411622a2699cee572fc0875aeaf1e7867cf9fca1a" dependencies = [ - "bumpalo", - "log", + "cfg-if", "once_cell", - "proc-macro2", - "quote", - "syn 2.0.87", + "rustversion", + "serde", + "serde_json", + "wasm-bindgen-macro", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "503b14d284f2c8dac03b819967e155ea753f573586193b2b2c95990cb5d69280" dependencies = [ - "cfg-if", "js-sys", "wasm-bindgen", - "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "4e21a184b13fb19e157296e2c46056aec9092264fab83e4ba59e68c61b323c3d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3424,22 +3594,25 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "fecefd9c35bd935a20fc3fc344b5f29138961e4f47fb03297d88f2587afb5ebd" dependencies = [ + "bumpalo", "proc-macro2", "quote", - "syn 2.0.87", - "wasm-bindgen-backend", + "syn 2.0.117", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "23939e44bb9a5d7576fa2b563dc2e136628f1224e88a8deed09e04858b77871f" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-logger" @@ -3454,9 +3627,9 @@ dependencies = [ [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" dependencies = [ "futures-util", "js-sys", @@ -3467,9 +3640,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "a6430a72df5eb332242960fe84b3002a241163998241eb596d4f739b9757061d" dependencies = [ "js-sys", "wasm-bindgen", @@ -3481,18 +3654,18 @@ version = "0.1.0" dependencies = [ "filterlists-api", "futures", - "gloo-timers", - "gloo-utils", + "gloo-net 0.6.0", + "gloo-timers 0.4.0", + "gloo-utils 0.3.0", "log", "num-format", "readonly", "regex", - "reqwasm", "serde", "serde-tuple-vec-map", "serde_json", "serde_with", - "thiserror", + "thiserror 2.0.18", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -3503,16 +3676,19 @@ dependencies = [ ] [[package]] -name = "webpki-roots" -version = "0.25.4" +name = "webpki-root-certs" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" +checksum = "f31141ce3fc3e300ae89b78c0dd67f9708061d1d2eda54b8209346fd6be9a92c" +dependencies = [ + "rustls-pki-types", +] [[package]] name = "wildmatch" -version = "2.3.4" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3928939971918220fed093266b809d1ee4ec6c1a2d72692ff6876898f3b16c19" +checksum = "29333c3ea1ba8b17211763463ff24ee84e41c78224c16b001cd907e663a38c68" [[package]] name = "winapi-util" @@ -3520,185 +3696,170 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] name = "windows-core" -version = "0.52.0" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-targets 0.52.5", + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", ] [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-implement" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ - "windows-targets 0.48.5", + "proc-macro2", + "quote", + "syn 2.0.117", ] [[package]] -name = "windows-sys" -version = "0.52.0" +name = "windows-interface" +version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ - "windows-targets 0.52.5", + "proc-macro2", + "quote", + "syn 2.0.117", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-link", ] [[package]] -name = "windows-targets" -version = "0.52.5" +name = "windows-strings" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows-link", ] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" +name = "windows-sys" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] [[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" +name = "windows-targets" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] [[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" +name = "windows_aarch64_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] -name = "windows_i686_gnu" -version = "0.48.5" +name = "windows_aarch64_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.9" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86c949fede1d13936a99f14fafd3e76fd642b556dd2ce96287fbe2e0151bfac6" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] [[package]] -name = "winreg" -version = "0.50.0" +name = "winnow" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] +checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" [[package]] -name = "winreg" -version = "0.52.0" +name = "wit-bindgen" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" [[package]] name = "writeable" @@ -3708,17 +3869,23 @@ checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "yew" -version = "0.19.3" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a1ccb53e57d3f7d847338cf5758befa811cabe207df07f543c06f502f9998cd" +checksum = "2c154fadfa97eabdd3f3b79345ceeb9c05ee8f13f76d3d881d17fba618bf558d" dependencies = [ "console_error_panic_hook", + "futures", "gloo", - "gloo-utils", - "indexmap 1.9.3", + "implicit-clone", + "indexmap 2.14.0", "js-sys", - "scoped-tls-hkt", + "rustversion", + "serde", "slab", + "thiserror 2.0.18", + "tokio", + "tokise", + "tracing", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -3727,32 +3894,31 @@ dependencies = [ [[package]] name = "yew-macro" -version = "0.19.3" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fab79082b556d768d6e21811869c761893f0450e1d550a67892b9bce303b7bb" +checksum = "c08b883d84a035f57519d057f65a2a07ae25f1884ad485e1a9a523c9d880c1ad" dependencies = [ - "boolinator", - "lazy_static", + "prettyplease", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "rustversion", + "syn 2.0.117", ] [[package]] name = "yew-router" -version = "0.16.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155804f6f3aa309f596d5c3fa14486a94e7756f1edd7634569949e401d5099f2" +checksum = "870bd2a1aa6d608c0c789c122654e25f4927bb6bfe344cc0da3b630ac3c73260" dependencies = [ "gloo", - "gloo-utils", "js-sys", "route-recognizer", "serde", - "serde-wasm-bindgen", "serde_urlencoded", - "thiserror", + "tracing", + "urlencoding", "wasm-bindgen", "web-sys", "yew", @@ -3761,20 +3927,20 @@ dependencies = [ [[package]] name = "yew-router-macro" -version = "0.16.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39049d193b52eaad4ffc80916bf08806d142c90b5edcebd527644de438a7e19a" +checksum = "8399f1d134ab8e69abc7cded19f114621d520bd9c79c5a0f34091bf664d7325b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.117", ] [[package]] name = "yoke" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -3789,28 +3955,28 @@ checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", "synstructure", ] [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] @@ -3830,15 +3996,15 @@ checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", "synstructure", ] [[package]] name = "zeroize" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" [[package]] name = "zerotrie" @@ -3870,7 +4036,7 @@ checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.117", ] [[package]] diff --git a/README.md b/README.md index 653987d..8b1315b 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ features, dependency updates, an improved UI, and server-friendly configuration - [Install the root CA on your client devices](#2-install-the-root-ca-on-your-client-devices) - [Point clients at the proxy](#3-point-clients-at-the-proxy) - [Cert-pinned hosts (exclusions)](#4-cert-pinned-hosts-exclusions) + - [Filter only selected hosts (inclusions)](#5-filter-only-selected-hosts-inclusions) + - [HTTP CONNECT and proxy chaining](#6-http-connect-and-proxy-chaining) - [Screenshots](#screenshots) - [Acknowledgements](#acknowledgements) @@ -107,6 +109,7 @@ Download and install the deb/rpm/binary with mips in the name ```sh docker run -d --name privaxy --restart unless-stopped \ + --log-driver json-file --log-opt max-size=10m --log-opt max-file=3 \ -p 8100:8100 -p 8200:8200 \ -v /path/to/conf:/conf \ ghcr.io/joshrmcdaniel/privaxy: @@ -151,6 +154,11 @@ services: volumes: - path/to/conf:/conf restart: unless-stopped + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" ``` Tags: @@ -224,17 +232,89 @@ intercepted. Privaxy handles this two ways: and not user-editable. - A **list** of commonly cert-pinned hosts that is pre-populated into your editable exclusions on first config creation. - Settings → Exclusions shows the list; the **Reset to defaults** button + Settings → Inclusions & exclusions shows the list; the **Reset to defaults** button re-applies the default list. [Source](privaxy/src/server/proxy/exclusions.rs) Excluded hosts are still CONNECT-tunneled through the proxy, they're just not decrypted. Filter rules **do not** apply to their traffic. If you find a site that breaks under MITM, add its hostname (wildcards -like `*.example.com` are supported) to Settings → Exclusions and click +like `*.example.com` are supported) to Settings → Inclusions & exclusions and click Save. If it's something common, please open an issue so it can be added to the recommended list. +### 5. Filter only selected hosts (inclusions) + +Under **Settings → Inclusions & exclusions**, enable **Only filter included +hosts**, enter one hostname or wildcard pattern per line, and save. Use both +`example.com` and `*.example.com` to cover a domain and its subdomains. Matching +is case-insensitive and uses the destination hostname without its port. + +In this mode, only included hosts are filtered. Everything else passes through +without ad blocking, HTML/userscript injection, or HTTPS decryption. Explicit +exclusions and the built-in Apple exclusions always take precedence. An empty +inclusion list filters nothing. Turning the mode off retains the list and +restores filtering of all non-excluded hosts. + +The generated PAC file uses the same inclusion list and returns `DIRECT` for +unlisted or excluded hosts; existing PAC bypass rules still take precedence. +Clients configured with a manual proxy continue forwarding through Privaxy, +which tunnels unselected HTTPS hosts and forwards unselected HTTP unchanged. +Clients may need to refresh their PAC file and reopen connections after changes; +an established HTTPS tunnel keeps its original interception decision. + +Inclusions select destination hosts, not entire browsing sessions. Third-party +ad and resource hosts used by an included site must be included separately if +you want their requests filtered too. + +The equivalent top-level configuration fields are `include_only = true` and +`inclusions = ["example.com", "*.example.com"]`. Existing configurations default +to `include_only = false`. File edits take effect on SIGHUP or restart. + +### 6. HTTP CONNECT and proxy chaining + +Privaxy accepts both plain HTTP and HTTPS inside CONNECT tunnels. A compatible +HTTP proxy or adapter can use Privaxy as its upstream proxy: + +`Client → HTTP proxy or adapter → Privaxy → website` + +Point the preceding proxy at Privaxy's proxy port (default `8100`). Privaxy +automatically recognizes HTTP and TLS, including on nonstandard destination +ports, and applies the same filtering, HTML injection, inclusions, and +exclusions used by ordinary proxy clients. No additional Privaxy setting is +needed. This feature supports chains that feed into Privaxy; configuring an +upstream proxy for Privaxy's own outbound traffic is outside its scope. + +The preceding proxy should preserve the destination hostname in CONNECT, which +Privaxy uses for certificates and domain matching. An IP-only CONNECT for a +named HTTPS site does not recover the hostname from TLS SNI and can fail +certificate validation. Clients must trust Privaxy's CA; certificate-pinned +services still need exclusions. Excluded or unselected hosts are tunneled +without protocol probing. + +Filtering covers TCP HTTP/HTTPS. Handle UDP/QUIC and non-HTTP protocols in your +routing policy; HTTP/3 traffic allowed directly will bypass filtering. +Privaxy's client statistics identify the connecting proxy's address, so devices +sharing that address appear together. + +#### Example: tun2proxy + +[tun2proxy](https://github.com/tun2proxy/tun2proxy) is one adapter that can send +traffic into Privaxy using CONNECT. Configure it to use Privaxy's proxy port +and **virtual DNS**, which preserves destination hostnames in CONNECT. For an +already configured TUN interface and Privaxy running on the same machine: + +```sh +tun2proxy-bin --tun tun0 --proxy http://127.0.0.1:8100 --dns virtual +``` + +Replace the interface and proxy address for your deployment. You are responsible +for creating the TUN interface, selecting client devices, routing their traffic +and DNS queries through tun2proxy, and keeping the proxy's outbound connections +out of that route to avoid loops. Follow +[tun2proxy's setup documentation](https://github.com/tun2proxy/tun2proxy#setup) +for those steps. + > **Recovering access**: if you lose the web-UI password, delete the > `password_hash` value from the config file and restart. The web UI will > force the setup flow again. diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..785cd29 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,75 @@ +# Privaxy v0.8.0 + +Privaxy v0.8.0 adds userscripts, filtering for selected hosts, and broader HTTP +CONNECT support. It also improves streaming performance, filter-list recovery, +and the tools for diagnosing sites that break under interception. + +## Highlights + +- **Userscripts managed from the web UI.** Install by URL or paste, edit source, + enable or disable individual scripts, and check for updates. Supports common + Greasemonkey/Tampermonkey metadata and APIs, persistent storage, resources, + menu commands, and server-side requests controlled by each script's + `@connect` rules. URL-installed scripts also check for updates automatically. +- **Filter only selected hosts.** Inclusion mode intercepts the hosts you + select and tunnels everything else. Exclusions always take precedence, and + an empty inclusion list bypasses all hosts. The same policy applies to + HTTP, HTTPS, and PAC files; existing configurations keep their previous mode. +- **HTTP CONNECT and incoming proxy chaining.** Compatible HTTP proxies and + adapters can send both plain HTTP and HTTPS through CONNECT to Privaxy, + including on nonstandard ports. Traffic uses the existing filtering, + injection, and inclusion/exclusion policies. The README includes tun2proxy + as one example, with routing configured by the user. +- **Better filter-list management.** Refresh all enabled lists on demand, see + download failures and their causes, and edit or remove user-added lists. + Empty or invalid caches are recovered or downloaded again, and atomic + replacement prevents failed writes from truncating a working list. +- **Easier interception troubleshooting.** Proxy error pages link to an + exclusion confirmation page. The UI also lists recent TLS interception + failures, with actions to exclude or ignore a host. A configurable GUI URL + keeps these links usable behind reverse proxies and Docker NAT. + +## Reliability and performance + +- HTML responses stream as they are rewritten, allowing browsers to start + rendering before the complete document arrives. Bounded buffering limits + memory use when downstream clients are slow. +- Larger WebSocket buffers, a shared adblock engine, and fewer repeated + cosmetic lookups reduce overhead. Filter updates replace the engine without + pausing requests for the full rebuild. +- The proxy waits for initial filter loading before accepting traffic. The + web UI remains available during loading and reports list failures. +- Invalid configuration edits retain the last working configuration. Reloads + no longer race for the web UI listener, and bind failures retry. +- Fixes cover filtering on upgraded requests, WebSocket/MMTLS handling, + truncated upstream responses, replacement-resource decoding, IPv6 + certificates, and CSP compatibility for injected content. +- PAC files are also served at `/wpad.dat`, and CIDR bypass rules now render + valid subnet masks. +- The HTTP/TLS stack and frontend dependencies have been updated. Docker + examples include log rotation to limit disk usage. + +## Upgrading and compatibility + +- Existing configuration files remain supported. For v0.7.1 configurations, + inclusion mode defaults off and no userscripts are installed automatically. +- If upgrading from a development build with userscripts, **reload open pages** + after upgrading. Userscript endpoints now use tokens bound to each script + and matched page; disabling a script or changing its match rules revokes + access. +- Installed userscripts run on matching pages for every client behind the + proxy, in the page's main JavaScript world. This is a subset of browser + userscript-manager functionality; see the changelog for supported APIs and + known limitations. Requests to private networks remain disabled by default. +- For incoming proxy chains, preserve destination hostnames in CONNECT so + domain filtering and HTTPS certificates work correctly. Clients still need + to trust Privaxy's CA. This release does not add configuration for routing + Privaxy's outbound traffic through another upstream proxy. TUN setup, + routing, and UDP/QUIC handling remain the user's responsibility. +- To pin this release in Docker, use `ghcr.io/joshrmcdaniel/privaxy:0.8.0`. + Existing containers need to be recreated to adopt the log-rotation options + shown in the README. + +See the [full changelog](https://github.com/joshrmcdaniel/privaxy/blob/v0.8.0/CHANGELOG.md) +and [proxy-chaining setup](https://github.com/joshrmcdaniel/privaxy/blob/v0.8.0/README.md#6-http-connect-and-proxy-chaining) +for details. diff --git a/docker-compose.example.yml b/docker-compose.example.yml index 89cf7d8..9b07885 100644 --- a/docker-compose.example.yml +++ b/docker-compose.example.yml @@ -6,5 +6,9 @@ services: - "8200:8200" volumes: - ./conf:/conf + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" restart: unless-stopped - \ No newline at end of file diff --git a/filterlists-api/Cargo.toml b/filterlists-api/Cargo.toml index 597307d..1d27720 100644 --- a/filterlists-api/Cargo.toml +++ b/filterlists-api/Cargo.toml @@ -11,10 +11,13 @@ path = "src/lib.rs" readonly = "0.2.12" serde = { version = "1.0.203", features = ["derive"] } serde_json = "1.0.117" -reqwest = { version = "0.12.4", features = ["json"], optional = true } +reqwest = { version = "0.13", default-features = false, features = [ + "json", + "rustls-no-provider", +], optional = true } reqwasm = { version = "0.5.0", optional = true } async-trait = "0.1.80" -thiserror = "1.0.61" +thiserror = "2" [features] default = [] diff --git a/filterlists-api/src/dtypes.rs b/filterlists-api/src/dtypes.rs index 56f3e19..375208e 100644 --- a/filterlists-api/src/dtypes.rs +++ b/filterlists-api/src/dtypes.rs @@ -210,7 +210,7 @@ pub struct FilterTag { } #[derive(Serialize, Deserialize, PartialEq, Clone, Debug, Error)] -#[error("{r#type} error ({status}): {title} {trace_id}")] +#[error("{type} error ({status}): {title} {trace_id}")] #[serde(rename_all = "camelCase")] #[readonly::make] pub struct FilterListAPIError { diff --git a/filterlists-api/src/get.rs b/filterlists-api/src/get.rs index 713edb2..3ac5cf1 100644 --- a/filterlists-api/src/get.rs +++ b/filterlists-api/src/get.rs @@ -42,7 +42,6 @@ if_wasm! { } if_reqwest! { - use reqwest; use serde::de::DeserializeOwned; pub(crate) async fn _get(url: &str) -> Result diff --git a/privaxy/Cargo.toml b/privaxy/Cargo.toml index d183e25..4fae88e 100644 --- a/privaxy/Cargo.toml +++ b/privaxy/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "privaxy" description = "Next generation tracker and advertisement blocker" -version = "0.7.1" +version = "0.8.0" edition = "2021" authors = [ "Pierre Barre ", @@ -51,38 +51,76 @@ name = "privaxy" path = "src/server/lib.rs" [dependencies] -hyper = { version = "0.14.29", features = ["full"] } +hyper = { version = "1", features = ["full"] } +hyper-util = { version = "0.1", features = [ + "client-legacy", + "server-auto", + "server-graceful", + "service", + "tokio", + "http1", + "http2", +] } +http-body-util = "0.1" tokio = { version = "1.22.0", features = ["full"] } serde_json = "1.0.89" -toml = "0.8.13" +toml = "1" serde = { version = "1.0.148", features = ["derive"] } tokio-util = { version = "0.7.4", features = ["full"] } -adblock = { version = "0.12.5" } +tokio-stream = "0.1" +bytes = "1" +socket2 = "0.5" +# default-features = false only to drop `single-thread`: the multi-thread +# engine is Send + Sync, which lets requests share one engine directly instead +# of funneling through a dedicated blocker thread. The other two features are +# adblock defaults, restated because default-features is all-or-nothing. +adblock = { version = "0.12.5", default-features = false, features = [ + "embedded-domain-resolver", + "full-regex-handling", +] } openssl = { version = "0.10.43", features = ["vendored"] } include_dir = "0.7.3" chrono = { version = "0.4.23", features = ["serde"] } -rustls = { version = "0.21.12" } +rustls = { version = "0.23", default-features = false, features = [ + "ring", + "logging", + "std", + "tls12", +] } futures-util = "0.3.25" wildmatch = "2.1.1" -http = "0.2.12" +http = "1" mime_guess = "2.0.4" -tokio-rustls = "0.24.1" -hyper-rustls = { version = "0.24.2", features = ["http1", "http2"] } +tokio-rustls = { version = "0.26", default-features = false, features = [ + "ring", + "logging", + "tls12", +] } +hyper-rustls = { version = "0.27", default-features = false, features = [ + "http1", + "http2", + "ring", + "native-tokio", + "tls12", + "logging", +] } log = "0.4.17" -env_logger = "0.11.3" -uluru = "3.0.0" +env_logger = "0.11.10" +uluru = "3.1.0" +portable-atomic = "1" regex = "1.7.0" lazy_static = "1.4.0" lol_html = "1.2.1" -crossbeam-channel = "0.5.6" -thiserror = "1.0.37" +thiserror = "2" url = "2.3.1" futures = "0.3.25" -dirs = "5.0.1" -async-compression = { version = "0.4.11", features = ["futures-io", "gzip"] } -reqwest = { version = "0.11.27", features = [ +dirs = "6" +async-compression = { version = "0.4.42", features = ["futures-io", "gzip"] } +reqwest = { version = "0.13", default-features = false, features = [ + "charset", + "http2", "stream", - "rustls-tls", + "rustls-no-provider", "gzip", "deflate", "json", @@ -91,11 +129,22 @@ reqwest = { version = "0.11.27", features = [ once_cell = "1.16.0" serde-tuple-vec-map = "1.0.1" base64 = "0.22.1" -warp = { version = "0.3.7", features = ["tls"] } +warp = { version = "0.4", features = ["server", "websocket"] } sha2 = "0.10.8" hex = "0.4.3" -serde_with = "3.8.1" -tera = { version = "1.20", default-features = false } -argon2 = "0.5" +serde_with = "3.21" +tera = { version = "1", default-features = false } +argon2 = { version = "0.5", features = ["std"] } hmac = "0.12" -filterlists-api = { path = "../filterlists-api", features = ["reqwest"] } \ No newline at end of file +filterlists-api = { path = "../filterlists-api", features = ["reqwest"] } + +# getrandom 0.3 (pulled in via warp -> tokio-tungstenite -> rand) selects a +# backend that calls the libc `getrandom()` wrapper on mips{,el}-unknown-linux-gnu, +# but the MIPS cross-toolchain's pre-2.25 glibc doesn't export it, so the binary +# fails to link. For just these targets we switch getrandom to its `custom` +# backend (`.cargo/config.toml`) and implement it via the raw SYS_getrandom +# syscall in `lib.rs`. These deps exist only to name `getrandom::Error` and call +# `libc::syscall` from that backend. +[target.'cfg(all(target_os = "linux", target_arch = "mips", target_env = "gnu"))'.dependencies] +getrandom = "0.3" +libc = "0.2" diff --git a/privaxy/build.rs b/privaxy/build.rs index 99bfefa..3043b92 100644 --- a/privaxy/build.rs +++ b/privaxy/build.rs @@ -1,12 +1,136 @@ -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use std::process::Command; fn main() { let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); + let out_dir = PathBuf::from(std::env::var("OUT_DIR").expect("cargo provides OUT_DIR")); + + build_procedural_shim(&manifest_dir, &out_dir); + build_scriptlet_resources(&manifest_dir, &out_dir); +} + +/// Strip the comments out of the procedural-cosmetics shim before it is embedded. +/// +/// The shim is injected inline into every HTML response that has cosmetic rules, +/// and the proxy re-sends responses uncompressed, so its comments would be real +/// bytes on the wire on every page load — roughly two thirds of the file. Keeping +/// them in the source and dropping them here means the reasoning lives next to +/// the code without being paid for at runtime. +/// +/// Deliberately not done with Node: the cross-compile path in +/// `build_scriptlet_resources` exists precisely because Node isn't always +/// available, and the shim has to be embedded in every build. +fn build_procedural_shim(manifest_dir: &Path, out_dir: &Path) { + let source_path = manifest_dir.join("src/resources/procedural_cosmetics.js"); + println!("cargo:rerun-if-changed={}", source_path.display()); + + let source = std::fs::read_to_string(&source_path).unwrap_or_else(|e| { + panic!( + "failed to read the procedural shim at {}: {e}", + source_path.display() + ) + }); + + let embedded = match strip_whole_line_comments(&source) { + Some(stripped) => stripped, + None => { + // Embedding the file verbatim is always correct, only larger, so an + // unrecognised construct degrades instead of risking a corrupted shim + // on every page. + println!( + "cargo:warning=procedural_cosmetics.js contains a construct the comment \ + stripper does not handle (a multi-line string, or a comment sharing a line \ + with code); embedding it verbatim. See strip_whole_line_comments in \ + privaxy/build.rs." + ); + source + } + }; + + std::fs::write(out_dir.join("procedural_cosmetics.js"), embedded) + .expect("failed to write the stripped procedural shim to OUT_DIR"); +} + +/// Remove comment-only lines, blank lines, and indentation from JavaScript. +/// +/// This is a line-oriented pass, not a JavaScript lexer: it decides what to drop +/// purely from how a line *starts*, and never inspects the interior of a line it +/// keeps. That is what makes it safe without parsing — a `//` inside a string or +/// a regex literal cannot be mistaken for a comment, because such a line is kept +/// whole. +/// +/// It returns `None` rather than guessing whenever it meets something that would +/// invalidate that reasoning: +/// +/// * a backtick, which may open a template literal spanning lines: a line +/// inside one could begin with `//` and would then be dropped wrongly; +/// * a trailing backslash, i.e. a string continued onto the next line, for the +/// same reason; +/// * a comment sharing a line with code, where telling comment from string +/// genuinely does need a lexer. +/// +/// Line numbers shift, which costs nothing here: the shim is concatenated after +/// the scriptlet payload before injection, so they never matched the file anyway. +fn strip_whole_line_comments(source: &str) -> Option { + let mut out = String::with_capacity(source.len()); + let mut in_block_comment = false; + + for line in source.lines() { + let trimmed = line.trim(); + + if in_block_comment { + match trimmed.find("*/") { + // Code trailing the end of a block comment needs a lexer to split. + Some(end) if end + 2 != trimmed.len() => return None, + Some(_) => in_block_comment = false, + None => {} + } + continue; + } + + if trimmed.starts_with("//") { + continue; + } + + if trimmed.starts_with("/*") { + match trimmed.find("*/") { + Some(end) if end + 2 != trimmed.len() => return None, + // `/*/` both starts and ends with a delimiter without being a + // complete comment, hence the length check. + Some(_) if trimmed.len() >= 4 => {} + _ => in_block_comment = true, + } + continue; + } + + if trimmed.is_empty() { + continue; + } + + if trimmed.contains('`') + || trimmed.ends_with('\\') + || trimmed.contains("//") + || trimmed.contains("/*") + { + return None; + } + + out.push_str(trimmed); + out.push('\n'); + } + + // An unterminated block comment means the file was not what we assumed. + if in_block_comment { + return None; + } + + Some(out) +} + +fn build_scriptlet_resources(manifest_dir: &Path, out_dir: &Path) { let scriptlets_src = manifest_dir.join("src/resources/vendor/ublock/scriptlets.js"); let builder = manifest_dir.join("build-scriptlets.mjs"); - let out_dir = std::env::var("OUT_DIR").expect("cargo provides OUT_DIR"); - let out_path = PathBuf::from(&out_dir).join("scriptlets-resources.json"); + let out_path = out_dir.join("scriptlets-resources.json"); println!("cargo:rerun-if-changed={}", scriptlets_src.display()); println!("cargo:rerun-if-changed={}", builder.display()); diff --git a/privaxy/src/resources/error.html b/privaxy/src/resources/error.html index e9201eb..03e7309 100644 --- a/privaxy/src/resources/error.html +++ b/privaxy/src/resources/error.html @@ -13,6 +13,7 @@

Bad Reason:
#{request_error_reason}#

+ #{exclude_section}# diff --git a/privaxy/src/resources/head.html b/privaxy/src/resources/head.html index be9f617..36ba11d 100644 --- a/privaxy/src/resources/head.html +++ b/privaxy/src/resources/head.html @@ -609,6 +609,33 @@ outline-style: solid; } + .mt-4 { + margin-top: 1rem; + } + + .inline-block { + display: inline-block; + } + + .py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + } + + .bg-blue-600 { + --tw-bg-opacity: 1; + background-color: rgb(37 99 235 / var(--tw-bg-opacity)); + } + + .text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); + } + + .font-medium { + font-weight: 500; + } + @media (min-width: 640px) { .sm\:ml-6 { margin-left: 1.5rem; diff --git a/privaxy/src/resources/procedural_cosmetics.js b/privaxy/src/resources/procedural_cosmetics.js index 5be040f..4139546 100644 --- a/privaxy/src/resources/procedural_cosmetics.js +++ b/privaxy/src/resources/procedural_cosmetics.js @@ -7,6 +7,20 @@ * This shim receives those rules as JSON and applies them on load and on every * subsequent DOM mutation. * + * It also adopts the plain-CSS cosmetic rules into every shadow root it finds. + * That server-side "# ); @@ -312,10 +665,79 @@ impl Rewriter { let bytes = Bytes::copy_from_slice(to_append_to_response.as_bytes()); - if let Err(_err) = body_sender.send_data(bytes).await { + if let Err(_err) = body_sender.send(Ok(Frame::data(bytes))).await { break; } } } } } + +#[cfg(test)] +mod tests { + use super::*; + use crate::blocker::BlockingDisabledStore; + use crate::proxy::body_channel; + use http_body_util::BodyExt; + use std::sync::RwLock; + + #[tokio::test] + async fn upstream_errors_abort_html_without_appending_a_completed_document() { + for fails in [false, true] { + let requester = + AdblockRequester::new(BlockingDisabledStore(Arc::new(RwLock::new(false)))); + let cosmetics = requester + .get_cosmetic_response("https://example.com/".into()) + .await; + let (input, receiver) = mpsc::channel(2); + let (sender, mut body) = body_channel(); + let rewriter = Rewriter::new( + requester, + receiver, + sender, + Statistics::new(), + "abc".into(), + cosmetics, + false, + Vec::new(), + GmStorageStore::in_memory(), + HashMap::new(), + ); + input + .send(Ok(Bytes::from_static(b"partial"))) + .await + .unwrap(); + if fails { + input + .send(Err(std::io::Error::new( + std::io::ErrorKind::UnexpectedEof, + "origin disconnected", + ))) + .await + .unwrap(); + } + drop(input); + let task = tokio::task::spawn_blocking(move || rewriter.rewrite()); + let mut data = Vec::new(); + let mut failure = None; + while let Some(frame) = body.frame().await { + match frame { + Ok(frame) => { + if let Ok(chunk) = frame.into_data() { + data.extend_from_slice(&chunk); + } + } + Err(error) => { + failure = Some(error.kind()); + break; + } + } + } + task.await.unwrap(); + assert_eq!(failure, fails.then_some(std::io::ErrorKind::UnexpectedEof)); + let html = String::from_utf8(data).unwrap(); + assert_eq!(html.ends_with(""), !fails); + assert_eq!(html.contains(COSMETIC_STYLE_MARKER), !fails); + } + } +} diff --git a/privaxy/src/server/proxy/mitm.rs b/privaxy/src/server/proxy/mitm.rs index 0733e1c..286979a 100644 --- a/privaxy/src/server/proxy/mitm.rs +++ b/privaxy/src/server/proxy/mitm.rs @@ -1,28 +1,36 @@ -use super::{exclusions::LocalExclusionStore, serve::serve}; +use super::serve::UpgradeClient; +use super::tls_failures::TlsFailureStore; +use super::userscripts::UserScriptContext; +use super::{empty_body, exclusions::LocalExclusionStore, serve::serve, ProxyBody}; use crate::{ blocker::AdblockRequester, cert::CertCache, configuration::DohConfig, statistics::Statistics, Event, }; use http::uri::{Authority, Scheme}; -use hyper::{ - client::HttpConnector, http, server::conn::Http, service::service_fn, upgrade::Upgraded, Body, - Method, Request, Response, -}; -use hyper_rustls::HttpsConnector; +use http::{Method, Request, Response}; +use hyper::body::Incoming; +use hyper::service::service_fn; +use hyper::upgrade::Upgraded; +use hyper_util::rt::{TokioExecutor, TokioIo}; +use hyper_util::server::conn::auto; use std::{net::IpAddr, sync::Arc}; use tokio::{ - io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt}, + io::{ + AsyncBufRead, AsyncBufReadExt, AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt, + BufReader, + }, net::TcpStream, sync::broadcast, }; use tokio_rustls::TlsAcceptor; +use tokio_util::either::Either; #[allow(clippy::too_many_arguments)] pub(crate) async fn serve_mitm_session( adblock_requester: AdblockRequester, - hyper_client: hyper::Client>, + hyper_client: UpgradeClient, client: reqwest::Client, - req: Request, + req: Request, cert_cache: CertCache, broadcast_tx: broadcast::Sender, statistics: Statistics, @@ -30,11 +38,14 @@ pub(crate) async fn serve_mitm_session( local_exclusion_store: LocalExclusionStore, doh_config: DohConfig, scriptlet_debug_logging: bool, -) -> Result, hyper::Error> { - let authority = match req.uri().authority().cloned() { + tls_failure_store: TlsFailureStore, + gui_base_url: Option, + user_scripts: UserScriptContext, +) -> Result, hyper::Error> { + let raw_authority = match req.uri().authority().cloned() { Some(authority) => authority, None => { - let mut response = Response::new(Body::empty()); + let mut response = Response::new(empty_body()); *response.status_mut() = http::StatusCode::BAD_REQUEST; log::warn!("Received a request without proper authority, sending bad request"); @@ -43,77 +54,121 @@ pub(crate) async fn serve_mitm_session( } }; + // Apple's RCS client tunnels to Google's Jibe backend with a service + // selector embedded in the CONNECT authority — `CONNECT rbm.goog(smsft):443`. + // The parenthetical is not part of the DNS name, so everything operational + // (cert minting, exclusion matching, tunneling, outbound requests) works on + // the sanitized authority; the raw one is kept for logging and for + // exclusion entries that match the literal client-sent host. + let authority = sanitize_authority(&raw_authority); + if Method::CONNECT == req.method() { - // Received an HTTP request like: - // ``` - // CONNECT www.domain.com:443 HTTP/1.1 - // Host: www.domain.com:443 - // Proxy-Connection: Keep-Alive - // ``` - // - // When HTTP method is CONNECT we should return an empty body - // then we can eventually upgrade the connection and talk a new protocol. - let server_configuration = - Arc::new(cert_cache.get(authority.clone()).await.server_configuration); + // tun2proxy uses CONNECT for every TCP flow, including plain HTTP. + // Reply before reading its payload; clients wait for the 200 first. + let intercept = + should_intercept_authority(&local_exclusion_store, &authority, &raw_authority); tokio::task::spawn(async move { - match hyper::upgrade::on(req).await { - Ok(mut upgraded) => { - let is_host_blacklisted = local_exclusion_store.contains(authority.host()); - - if is_host_blacklisted { - let _result = tunnel(&mut upgraded, &authority).await; - - return; - } - - let http = Http::new(); + let upgraded = match hyper::upgrade::on(req).await { + Ok(upgraded) => upgraded, + Err(error) => { + log::error!("CONNECT upgrade failed for {raw_authority}: {error}"); + return; + } + }; + let mut upgraded = TokioIo::new(upgraded); + if !intercept { + // Bypass before looking at any payload. This also preserves + // server-first protocols and avoids unnecessary cert minting. + let _ = tunnel(&mut upgraded, &authority, &raw_authority).await; + return; + } + // Keep both hyper's upgrade read-ahead and our protocol peek. The + // first HTTP bytes or TLS ClientHello must reach the parser intact. + let mut upgraded = BufReader::new(upgraded); + let protocol = match peek_connect_protocol(&mut upgraded).await { + Ok(Some(protocol)) => protocol, + Ok(None) => return, + Err(error) => { + log::debug!("Unable to read CONNECT payload for {raw_authority}: {error}"); + return; + } + }; + let (stream, scheme) = match protocol { + ConnectProtocol::Http => (Either::Left(upgraded), Scheme::HTTP), + ConnectProtocol::Tls => { + // Hostnames come from CONNECT (tun2proxy's virtual DNS + // supplies them). Mint only once we know this is TLS. + let server_configuration = + Arc::new(cert_cache.get(authority.clone()).await.server_configuration); match TlsAcceptor::from(server_configuration) .accept(upgraded) .await { - Ok(tls_stream) => { - let _result = http - .serve_connection( - tls_stream, - service_fn(move |req| { - serve( - adblock_requester.clone(), - req, - hyper_client.clone(), - client.clone(), - authority.clone(), - Scheme::HTTPS, - broadcast_tx.clone(), - statistics.clone(), - client_ip_address, - doh_config.clone(), - scriptlet_debug_logging, - ) - }), - ) - .with_upgrades() - .await; - } - // Couldn't perform the tls handshake, they may only support TLS features that we don't or - // make use of untrusted certificates. Let's add them to a blacklist so we'll be able to - // tunnel them instead of trying to perform MITM. - // No blocking will be able to be performed. + Ok(tls_stream) => (Either::Right(tls_stream), Scheme::HTTPS), Err(error) => { + // A failed TLS session cannot display an error + // page, so keep it visible in the web GUI. + tls_failure_store.record( + authority.host(), + &error.to_string(), + error.kind() == std::io::ErrorKind::UnexpectedEof, + ); if error.kind() == std::io::ErrorKind::UnexpectedEof { - log::warn!("Unable to perform handshake for host: {}. Consider excluding it from blocking. The service may not tolerate TLS interception.", authority); + log::warn!("Unable to perform handshake for host: {}. Consider excluding it from blocking. The service may not tolerate TLS interception.", raw_authority); + } else { + log::warn!( + "TLS interception handshake failed for host {}: {}", + raw_authority, + error + ); } + return; } } } - Err(e) => log::error!("upgrade error: {}", e), + }; + + // Both transports use the same filtering, rewriting and upgrade + // path. Bind requests to the CONNECT destination, not an inner + // Host header or absolute URI that could name a different host. + let session_authority = raw_authority.clone(); + let result = auto::Builder::new(TokioExecutor::new()) + .serve_connection_with_upgrades( + TokioIo::new(stream), + service_fn(move |req| { + serve( + adblock_requester.clone(), + req, + hyper_client.clone(), + client.clone(), + authority.clone(), + scheme.clone(), + broadcast_tx.clone(), + statistics.clone(), + client_ip_address, + doh_config.clone(), + scriptlet_debug_logging, + gui_base_url.clone(), + user_scripts.clone(), + should_intercept_authority( + &local_exclusion_store, + &authority, + &raw_authority, + ), + ) + }), + ) + .await; + if let Err(error) = result { + log::debug!("HTTP session inside CONNECT to {session_authority} ended: {error}"); } }); - Ok(Response::new(Body::empty())) - } else if local_exclusion_store.contains(authority.host()) - && req.headers().contains_key(http::header::UPGRADE) + Ok(Response::new(empty_body())) + } else if !should_intercept_authority(&local_exclusion_store, &authority, &raw_authority) + && is_opaque_upgrade(req.headers()) { // An excluded host performing a protocol upgrade over plain HTTP — e.g. // WeChat's MMTLS long-link (`http://dns.weixin.qq.com/mmtls/...`), which @@ -121,7 +176,8 @@ pub(crate) async fn serve_mitm_session( // bridge in `serve` can't carry that (the upstream never returns a clean // `101`, so the upgrade "expected but not completed"). Blind-tunnel the // bytes at the TCP level instead, the same way excluded CONNECT hosts - // are tunneled. + // are tunneled. WebSockets need the origin's handshake headers, so they + // use the ordinary upgrade bridge instead of this fabricated response. tunnel_http_upgrade(req, authority).await } else { // The request is not of method `CONNECT`. Therefore, @@ -141,6 +197,8 @@ pub(crate) async fn serve_mitm_session( ); } + let intercept = + should_intercept_authority(&local_exclusion_store, &authority, &raw_authority); serve( adblock_requester, req, @@ -153,11 +211,35 @@ pub(crate) async fn serve_mitm_session( client_ip_address, doh_config, scriptlet_debug_logging, + gui_base_url, + user_scripts, + intercept, ) .await } } +#[derive(Debug, PartialEq, Eq)] +enum ConnectProtocol { + Http, + Tls, +} + +/// TLS begins with a handshake record (0x16); everything else must parse as +/// HTTP. Unknown protocols are not automatically bypassed. BufReader retains +/// every byte, including a request sent in the same packet as CONNECT. +async fn peek_connect_protocol( + stream: &mut (impl AsyncBufRead + Unpin), +) -> std::io::Result> { + Ok(stream.fill_buf().await?.first().map(|byte| { + if *byte == 0x16 { + ConnectProtocol::Tls + } else { + ConnectProtocol::Http + } + })) +} + /// An HTTP `Upgrade` request whose target protocol is something other than /// WebSocket (or h2c) — e.g. WeChat's MMTLS long-link. The proxy can't do /// anything useful with such a protocol, and its hyper-based upgrade bridge @@ -187,9 +269,9 @@ fn is_opaque_upgrade(headers: &http::HeaderMap) -> bool { /// /// thank you, wechat, for making this necessary async fn tunnel_http_upgrade( - req: Request, + req: Request, authority: Authority, -) -> Result, hyper::Error> { +) -> Result, hyper::Error> { // Build the origin-form request head before `req` is moved into the task. let path = req .uri() @@ -218,7 +300,7 @@ async fn tunnel_http_upgrade( } }); - let mut response = Response::new(Body::empty()); + let mut response = Response::new(empty_body()); *response.status_mut() = http::StatusCode::SWITCHING_PROTOCOLS; response.headers_mut().insert( http::header::CONNECTION, @@ -235,7 +317,7 @@ async fn tunnel_http_upgrade( /// Upstream half of `tunnel_http_upgrade`: wait for the client upgrade, connect /// to the origin, replay the request head, strip the origin's `101`, then pipe. async fn bridge_http_upgrade( - req: Request, + req: Request, head: String, authority: &Authority, ) -> std::io::Result<()> { @@ -243,9 +325,11 @@ async fn bridge_http_upgrade( // Proxied `http://` authorities carry no port; default to 80. let port = authority.port_u16().unwrap_or(80); - let mut client = hyper::upgrade::on(req) + let upgraded = hyper::upgrade::on(req) .await - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?; + .map_err(std::io::Error::other)?; + // `TokioIo` bridges hyper 1.0's `Upgraded` to tokio's IO traits. + let mut client = TokioIo::new(upgraded); let mut upstream = TcpStream::connect((host, port)).await?; upstream.write_all(head.as_bytes()).await?; @@ -284,12 +368,98 @@ async fn read_past_response_headers(stream: &mut TcpStream) -> std::io::Result std::io::Result<()> { - let mut server = TcpStream::connect(authority.to_string()).await?; +/// Blind-tunnel an excluded CONNECT host: dial the (sanitized) authority and +/// pipe bytes both ways. DNS resolution and TCP connect failures are logged at +/// warn level — the client only ever sees its tunnel close, so without a log +/// line these failures are invisible. +async fn tunnel( + upgraded: &mut TokioIo, + authority: &Authority, + raw_authority: &Authority, +) -> std::io::Result<()> { + let mut server = match TcpStream::connect(authority.to_string()).await { + Ok(server) => server, + Err(error) => { + if authority == raw_authority { + log::warn!("Unable to open tunnel to {}: {}", authority, error); + } else { + log::warn!( + "Unable to open tunnel to {} (client requested {}): {}", + authority, + raw_authority, + error + ); + } + return Err(error); + } + }; log::debug!("Started tunneling host: {}", authority); - pipe(upgraded, &mut server).await + // Byte counts and lifetime make tunnel health diagnosable from logs: a + // tunnel that closes quickly having received 0 bytes from upstream means + // the server (or client) rejected the conversation, which is otherwise + // indistinguishable from a working tunnel. + let started_at = std::time::Instant::now(); + match tokio::io::copy_bidirectional(upgraded, &mut server).await { + Ok((bytes_to_server, bytes_to_client)) => { + log::debug!( + "Tunnel to {} closed after {:?}: {} bytes sent, {} bytes received", + authority, + started_at.elapsed(), + bytes_to_server, + bytes_to_client + ); + Ok(()) + } + Err(error) => { + log::debug!( + "Tunnel to {} ended with error after {:?}: {}", + authority, + started_at.elapsed(), + error + ); + Err(error) + } + } +} + +/// Strip a trailing parenthesized service selector from an authority's host. +/// +/// Apple's RCS client tunnels to Google's Jibe backend using CONNECT +/// authorities like `rbm.goog(smsft):443` (also seen on other Google RCS +/// hosts, e.g. under `telephony.goog`). The parenthetical selects a service +/// but is not part of the DNS name, so resolving or dialing the authority +/// verbatim fails. Returns the authority with the selector removed, or the +/// original authority when there is no trailing selector or stripping it +/// would not leave a valid authority. Plain `host:port`, bracketed IPv6 +/// literals, and hosts with non-trailing parentheses pass through unchanged. +fn sanitize_authority(authority: &Authority) -> Authority { + let host = authority.host(); + if !host.ends_with(')') { + return authority.clone(); + } + let stripped_host = match host.find('(') { + Some(open_paren) => &host[..open_paren], + None => return authority.clone(), + }; + if stripped_host.is_empty() { + return authority.clone(); + } + let candidate = match authority.port_u16() { + Some(port) => format!("{stripped_host}:{port}"), + None => stripped_host.to_string(), + }; + candidate.parse().unwrap_or_else(|_| authority.clone()) +} + +/// Apply one interception decision to the sanitized and original hostnames. +fn should_intercept_authority( + exclusions: &LocalExclusionStore, + authority: &Authority, + raw_authority: &Authority, +) -> bool { + exclusions.should_intercept(authority.host(), raw_authority.host()) } /// Pipe two duplex streams in both directions until either side closes. @@ -301,3 +471,155 @@ where tokio::io::copy_bidirectional(a, b).await?; Ok(()) } + +#[cfg(test)] +mod tests { + use super::*; + + #[tokio::test] + async fn connect_detection_preserves_http_and_tls_read_ahead() { + for (bytes, expected) in [ + ( + &b"POST /submit HTTP/1.1\r\nHost: example.com\r\nContent-Length: 4\r\n\r\nbody"[..], + ConnectProtocol::Http, + ), + ( + &b"PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"[..], + ConnectProtocol::Http, + ), + ( + &b"\x16\x03\x01\x00\x05\x01\x00\x00\x01\x00"[..], + ConnectProtocol::Tls, + ), + ] { + let mut stream = BufReader::new(bytes); + assert_eq!( + peek_connect_protocol(&mut stream).await.unwrap(), + Some(expected) + ); + let mut remaining = Vec::new(); + stream.read_to_end(&mut remaining).await.unwrap(); + assert_eq!(remaining, bytes); + } + } + + #[tokio::test] + async fn connect_detection_accepts_fragmented_requests_without_eating_the_first_byte() { + let (mut writer, reader) = tokio::io::duplex(64); + let mut reader = BufReader::new(reader); + writer.write_all(b"G").await.unwrap(); + assert_eq!( + peek_connect_protocol(&mut reader).await.unwrap(), + Some(ConnectProtocol::Http) + ); + writer.write_all(b"ET / HTTP/1.1\r\n\r\n").await.unwrap(); + writer.shutdown().await.unwrap(); + let mut request = String::new(); + reader.read_to_string(&mut request).await.unwrap(); + assert_eq!(request, "GET / HTTP/1.1\r\n\r\n"); + } + + #[tokio::test] + async fn connect_detection_handles_an_empty_connection() { + let mut stream = BufReader::new(&b""[..]); + assert_eq!(peek_connect_protocol(&mut stream).await.unwrap(), None); + } + + fn upgrade_headers(value: &str) -> http::HeaderMap { + let mut map = http::HeaderMap::new(); + map.insert( + http::header::UPGRADE, + http::HeaderValue::from_str(value).unwrap(), + ); + map + } + + #[test] + fn websocket_and_h2c_are_not_opaque() { + assert!(!is_opaque_upgrade(&upgrade_headers("websocket"))); + assert!(!is_opaque_upgrade(&upgrade_headers("WebSocket"))); + assert!(!is_opaque_upgrade(&upgrade_headers("h2c"))); + // A bridgeable token among others still counts as non-opaque. + assert!(!is_opaque_upgrade(&upgrade_headers("foo, websocket"))); + } + + #[test] + fn unknown_protocols_are_opaque() { + // e.g. WeChat's MMTLS long-link. + assert!(is_opaque_upgrade(&upgrade_headers("mmtls"))); + assert!(is_opaque_upgrade(&upgrade_headers("tls/1.2, foo"))); + } + + #[test] + fn absent_upgrade_header_is_not_opaque() { + assert!(!is_opaque_upgrade(&http::HeaderMap::new())); + } + + fn authority(value: &str) -> Authority { + value.parse().unwrap() + } + + #[test] + fn connect_authority_with_service_selector_parses_and_sanitizes() { + // Apple's RCS client sends e.g. `CONNECT rbm.goog(smsft):443` — the + // parenthetical must survive http's authority parsing (it does: parens + // are RFC 3986 sub-delims) and then be stripped by sanitization. + let raw = authority("rbm.goog(smsft):443"); + assert_eq!(raw.host(), "rbm.goog(smsft)"); + assert_eq!(raw.port_u16(), Some(443)); + + // `tunnel` dials `TcpStream::connect(authority.to_string())`, so this + // rendering is exactly the address the tunnel connects to. + assert_eq!(sanitize_authority(&raw).to_string(), "rbm.goog:443"); + } + + #[test] + fn sanitize_authority_strips_selector_generically() { + assert_eq!( + sanitize_authority(&authority("eu.telephony.goog(smsft):443")).to_string(), + "eu.telephony.goog:443" + ); + // Portless authorities keep working. + assert_eq!( + sanitize_authority(&authority("rbm.goog(smsft)")).to_string(), + "rbm.goog" + ); + } + + #[test] + fn sanitize_authority_leaves_normal_authorities_untouched() { + for value in [ + "example.com:443", + "example.com", + "127.0.0.1:8443", + "[::1]:443", + // A parenthetical that is not a trailing selector. + "weird(host).example.com:443", + // Unbalanced or empty variants stay as-is rather than guessing. + "rbm.goog):443", + "(smsft):443", + ] { + let raw = authority(value); + assert_eq!(sanitize_authority(&raw), raw, "{value}"); + } + } + + #[test] + fn exclusion_matching_tolerates_service_selector() { + let raw = authority("rbm.goog(smsft):443"); + let sanitized = sanitize_authority(&raw); + + let exact = LocalExclusionStore::new(vec![String::from("rbm.goog")]); + assert!(!should_intercept_authority(&exact, &sanitized, &raw)); + + let wildcard = LocalExclusionStore::new(vec![String::from("*.goog")]); + assert!(!should_intercept_authority(&wildcard, &sanitized, &raw)); + + // An entry matching the literal client-sent host keeps working. + let literal = LocalExclusionStore::new(vec![String::from("rbm.goog(smsft)")]); + assert!(!should_intercept_authority(&literal, &sanitized, &raw)); + + let unrelated = LocalExclusionStore::new(vec![String::from("example.com")]); + assert!(should_intercept_authority(&unrelated, &sanitized, &raw)); + } +} diff --git a/privaxy/src/server/proxy/mod.rs b/privaxy/src/server/proxy/mod.rs index 99e2ec3..0c162b0 100644 --- a/privaxy/src/server/proxy/mod.rs +++ b/privaxy/src/server/proxy/mod.rs @@ -3,4 +3,54 @@ pub(crate) mod mitm; pub(crate) mod serve; pub(crate) use mitm::serve_mitm_session; pub(crate) mod exclusions; +pub(crate) mod gm; pub(crate) mod html_rewriter; +pub(crate) mod tls_failures; +pub(crate) mod userscripts; + +use bytes::Bytes; +use http_body_util::{combinators::BoxBody, BodyExt, Empty, Full, StreamBody}; +use hyper::body::Frame; +use tokio_stream::wrappers::ReceiverStream; + +/// Response body type used throughout the proxy. hyper 1.0 removed the built-in +/// `hyper::Body`, so we standardize on a boxed body of `Bytes` with an +/// `io::Error` error type (the channel/stream bodies below can surface IO +/// errors; the static bodies never do). +pub(crate) type ProxyBody = BoxBody; + +/// Sending half of a streaming response body. Replaces `hyper::body::Sender` +/// (removed in hyper 1.0). Sending `Err` when the receiver has been dropped +/// signals the producer to stop, matching the old `Sender::send_data` +/// back-pressure/abort semantics. The bounded capacity preserves the +/// back-pressure the old channel body provided. +pub(crate) type BodySender = tokio::sync::mpsc::Sender, std::io::Error>>; + +/// hyper 1.0 replacement for `hyper::Body::channel()`: returns a sender plus a +/// streaming body fed by it. +pub(crate) fn body_channel() -> (BodySender, ProxyBody) { + let (tx, rx) = tokio::sync::mpsc::channel::, std::io::Error>>(32); + let body = StreamBody::new(ReceiverStream::new(rx)).boxed(); + (tx, body) +} + +/// An empty response body (replaces `hyper::Body::empty()`). +pub(crate) fn empty_body() -> ProxyBody { + Empty::::new() + .map_err(|never| match never {}) + .boxed() +} + +/// A fully-buffered response body (replaces `hyper::Body::from(..)`). +pub(crate) fn full_body>(chunk: B) -> ProxyBody { + Full::new(chunk.into()) + .map_err(|never| match never {}) + .boxed() +} + +/// Box an upstream `hyper::body::Incoming` into our `ProxyBody`, mapping +/// hyper's body error onto `io::Error` (used when forwarding an upstream +/// response through unchanged). +pub(crate) fn boxed_incoming(incoming: hyper::body::Incoming) -> ProxyBody { + incoming.map_err(std::io::Error::other).boxed() +} diff --git a/privaxy/src/server/proxy/serve.rs b/privaxy/src/server/proxy/serve.rs index 5ad3064..17e481c 100644 --- a/privaxy/src/server/proxy/serve.rs +++ b/privaxy/src/server/proxy/serve.rs @@ -1,19 +1,39 @@ use super::doh::{self, DohAction}; +use super::gm::endpoint as gm_endpoint; use super::html_rewriter::Rewriter; +use super::userscripts::UserScriptContext; +use super::{body_channel, boxed_incoming, empty_body, full_body, BodySender, ProxyBody}; use crate::blocker::AdblockRequester; use crate::configuration::DohConfig; use crate::statistics::Statistics; use crate::web_gui::events::Event; use adblock::blocker::BlockerResult; use base64::Engine; +use futures::TryStreamExt; use http::uri::{Authority, Scheme}; -use http::{HeaderMap, HeaderValue, StatusCode, Uri}; -use hyper::body::Bytes; -use hyper::client::HttpConnector; -use hyper::{http, Body, Request, Response}; +use http::{HeaderMap, HeaderValue, Request, Response, StatusCode, Uri}; +use http_body_util::{BodyExt, BodyStream, Limited}; +use hyper::body::{Frame, Incoming}; use hyper_rustls::HttpsConnector; +use hyper_util::client::legacy::connect::HttpConnector; +use hyper_util::client::legacy::Client as HyperClient; +use hyper_util::rt::TokioIo; use std::net::IpAddr; use tokio::sync::broadcast; +use url::Url; + +/// Type of the hyper client used for upgrade tunneling (websockets, etc.). +pub(crate) type UpgradeClient = HyperClient, ProxyBody>; + +/// Adapt an incoming request body into a `reqwest::Body`, preserving streaming +/// (hyper 1.0 + reqwest 0.13 no longer share a body type, so we bridge via a +/// `Bytes` stream). Trailer frames are dropped — proxied request bodies don't +/// carry meaningful trailers. +fn incoming_to_reqwest_body(incoming: Incoming) -> reqwest::Body { + let stream = + BodyStream::new(incoming).try_filter_map(|frame| async move { Ok(frame.into_data().ok()) }); + reqwest::Body::wrap_stream(stream) +} // Only *enforcing* CSP headers are augmented. Report-only headers // (`content-security-policy-report-only`) are deliberately left untouched: @@ -27,6 +47,10 @@ const CSP_HEADERS: [&str; 3] = [ "x-webkit-csp", ]; +/// Cap on a buffered request body for the reserved endpoints. Generous for a +/// batch of `GM_setValue` writes and far below anything worth buffering. +const MAX_RESERVED_ENDPOINT_BODY_BYTES: usize = 256 * 1024; + /// 16 random bytes → 22 chars of url-safe base64. Plenty of entropy and /// avoids `=` padding that some CSP parsers historically choked on. fn generate_csp_nonce() -> String { @@ -123,7 +147,7 @@ fn augment_csp_value(value: &str, nonce: &str) -> String { // that case our injected tag is already allowed by `'unsafe-inline'`, // and the nonce attribute on it is a harmless no-op, so we skip. fn needs_nonce(directive: &str) -> bool { - !(has_unsafe_inline(directive) && !has_nonce_or_hash(directive)) + !has_unsafe_inline(directive) || has_nonce_or_hash(directive) } fn append_to(directives: &mut [String], name: &str, nonce_source: &str) { for d in directives.iter_mut() { @@ -138,7 +162,9 @@ fn augment_csp_value(value: &str, nonce: &str) -> String { } } - let script_target = if has(&directives, "script-src") { + let script_target = if has(&directives, "script-src-elem") { + Some("script-src-elem") + } else if has(&directives, "script-src") { Some("script-src") } else if has(&directives, "default-src") { Some("default-src") @@ -155,7 +181,9 @@ fn augment_csp_value(value: &str, nonce: &str) -> String { } } - let style_target = if has(&directives, "style-src") { + let style_target = if has(&directives, "style-src-elem") { + Some("style-src-elem") + } else if has(&directives, "style-src") { Some("style-src") } else if has(&directives, "default-src") { Some("default-src") @@ -194,6 +222,18 @@ fn augment_csp_value(value: &str, nonce: &str) -> String { /// Modern browsers send `Sec-Fetch-Dest`, which maps cleanly onto these types. /// When it's absent we fall back to sniffing `Accept`, and finally to `other`. fn request_type_from_headers(headers: &HeaderMap) -> &'static str { + if headers + .get(http::header::UPGRADE) + .and_then(|value| value.to_str().ok()) + .is_some_and(|value| { + value + .split(',') + .any(|protocol| protocol.trim().eq_ignore_ascii_case("websocket")) + }) + { + return "websocket"; + } + if let Some(dest) = headers.get("sec-fetch-dest").and_then(|v| v.to_str().ok()) { return match dest { "document" => "document", @@ -248,8 +288,8 @@ fn url_for_matching(uri: &Uri) -> String { #[allow(clippy::too_many_arguments)] pub(crate) async fn serve( adblock_requester: AdblockRequester, - request: Request, - hyper_client: hyper::Client>, + request: Request, + hyper_client: UpgradeClient, client: reqwest::Client, authority: Authority, scheme: Scheme, @@ -258,7 +298,10 @@ pub(crate) async fn serve( client_ip_address: IpAddr, doh_config: DohConfig, scriptlet_debug_logging: bool, -) -> Result, hyper::Error> { + gui_base_url: Option, + user_scripts: UserScriptContext, + intercept: bool, +) -> Result, hyper::Error> { let scheme_string = scheme.to_string(); let uri = match http::uri::Builder::new() @@ -276,22 +319,77 @@ pub(crate) async fn serve( } }; - if request.headers().contains_key(http::header::UPGRADE) { - return Ok(perform_two_ends_upgrade(request, uri, hyper_client).await); + // Requests to the reserved path are answered by the proxy on the page's own + // origin and never forwarded upstream, which is what lets a userscript + // running in the page's main world reach Privaxy without CORS. Handled + // before any statistics counting: these are not proxied traffic. + if gm_endpoint::is_reserved(uri.path()) { + // A page opened before a policy change may still call its injected + // endpoints. Revoke them without leaking tokens/storage upstream. + if !intercept { + return Ok(get_empty_response(StatusCode::NOT_FOUND)); + } + let (parts, body) = request.into_parts(); + // Bounded so a hostile page cannot make the proxy buffer an unbounded + // body; an oversized request simply fails to parse below. + let collected = Limited::new(body, MAX_RESERVED_ENDPOINT_BODY_BYTES) + .collect() + .await + .map(|collected| collected.to_bytes()) + .unwrap_or_default(); + + return Ok( + gm_endpoint::handle(&uri, &parts.method, &collected, &user_scripts, &client).await, + ); } let (mut parts, body) = request.into_parts(); parts.uri = uri.clone(); - let (sender, new_body) = Body::channel(); - let req = Request::from_parts(parts, body); log::debug!("{} {}", req.method(), req.uri()); statistics.increment_top_clients(client_ip_address); - let request_type = request_type_from_headers(req.headers()).to_string(); + if !intercept { + let mut req = req; + req.headers_mut().remove(http::header::PROXY_AUTHORIZATION); + req.headers_mut().remove("proxy-connection"); + if broadcast_sender.receiver_count() > 0 { + let _ = broadcast_sender.send(Event { + now: chrono::Utc::now(), + method: req.method().to_string(), + url: uri.to_string(), + is_request_blocked: false, + }); + } + // Forward with hyper so bodies, compression and CSP remain untouched. + // This path skips adblock, DoH policy and all HTML/userscript injection. + let response = if req.headers().contains_key(http::header::UPGRADE) { + perform_two_ends_upgrade(req, uri, hyper_client).await + } else { + let (mut parts, body) = req.into_parts(); + parts.headers.remove(http::header::HOST); + // This client speaks HTTP/1 upstream, including for a request + // arriving over an existing intercepted HTTP/2 connection. + parts.version = http::Version::HTTP_11; + match hyper_client + .request(Request::from_parts(parts, boxed_incoming(body))) + .await + { + Ok(response) => response.map(boxed_incoming), + Err(error) => { + log::warn!("Unable to forward unfiltered request to {uri}: {error}"); + return Ok(get_empty_response(StatusCode::BAD_GATEWAY)); + } + } + }; + statistics.increment_proxied_requests(); + return Ok(response); + } + + let request_type = request_type_from_headers(req.headers()); // Canonical URL (default port stripped) for all adblock-engine matching — // see `url_for_matching`. The raw `uri` (which may carry `:443`) is still @@ -303,36 +401,40 @@ pub(crate) async fn serve( let doh_action = doh::classify(&doh_config, req.headers(), &uri); if let DohAction::Block = &doh_action { log::debug!("Refusing DoH request: {}", uri); + // Events only feed the live requests view; when nobody is subscribed, + // building one (two Strings and a timestamp) is wasted work. + if broadcast_sender.receiver_count() > 0 { + let _result = broadcast_sender.send(Event { + now: chrono::Utc::now(), + method: req.method().to_string(), + url: req.uri().to_string(), + is_request_blocked: true, + }); + } + statistics.increment_blocked_requests(); + return Ok(get_empty_response(StatusCode::BAD_GATEWAY)); + } + + let (is_request_blocked, blocker_result) = adblock_requester.is_network_url_blocked( + &match_url, + match req.headers().get(http::header::REFERER) { + Some(referer) => referer.to_str().unwrap_or(&match_url), + // When no referer, we default to `uri` as we otherwise may get many false + // positives due to the blocker thinking it's third party requests. + None => &match_url, + }, + request_type, + ); + + if broadcast_sender.receiver_count() > 0 { let _result = broadcast_sender.send(Event { now: chrono::Utc::now(), method: req.method().to_string(), url: req.uri().to_string(), - is_request_blocked: true, + is_request_blocked, }); - statistics.increment_blocked_requests(); - return Ok(get_empty_response(StatusCode::BAD_GATEWAY)); } - let (is_request_blocked, blocker_result) = adblock_requester - .is_network_url_blocked( - match_url.clone(), - match req.headers().get(http::header::REFERER) { - Some(referer) => referer.to_str().unwrap().to_string(), - // When no referer, we default to `uri` as we otherwise may get many false - // positives due to the blocker thinking it's third party requests. - None => match_url.clone(), - }, - request_type.clone(), - ) - .await; - - let _result = broadcast_sender.send(Event { - now: chrono::Utc::now(), - method: req.method().to_string(), - url: req.uri().to_string(), - is_request_blocked, - }); - if is_request_blocked { statistics.increment_blocked_requests(); statistics.increment_top_blocked_paths(format!( @@ -360,6 +462,25 @@ pub(crate) async fn serve( return Ok(get_blocked_by_privaxy_response(blocker_result)); } + // Upgrades still have an HTTP request whose URL and headers must pass the + // same policy checks as ordinary traffic, even if the origin declines it. + let outbound_url = match &doh_action { + DohAction::Redirect(upstream) => { + log::debug!("Redirecting DoH request to {}: {}", upstream, uri); + doh::redirect_url(upstream, req.method(), &uri) + } + _ => req.uri().to_string(), + }; + if req.headers().contains_key(http::header::UPGRADE) { + let Ok(outbound_uri) = outbound_url.parse() else { + return Ok(get_empty_response(StatusCode::BAD_GATEWAY)); + }; + let response = perform_two_ends_upgrade(req, outbound_uri, hyper_client).await; + statistics.increment_proxied_requests(); + return Ok(response); + } + + let (sender, new_body) = body_channel(); let mut new_response = Response::new(new_body); let mut request_headers = req.headers().clone(); @@ -389,28 +510,25 @@ pub(crate) async fn serve( } } } - // In redirect mode the query is forwarded to the configured upstream - // resolver instead of the endpoint the client chose; otherwise the original - // URL is used unchanged. - let outbound_url = match &doh_action { - DohAction::Redirect(upstream) => { - log::debug!("Redirecting DoH request to {}: {}", upstream, uri); - doh::redirect_url(upstream, req.method(), &uri) - } - _ => req.uri().to_string(), - }; - let mut response = match client .request(req.method().clone(), outbound_url) .headers(request_headers) - .body(req.into_body()) + .body(incoming_to_reqwest_body(req.into_body())) .send() .await { Ok(response) => response, Err(err) => { - log::error!("Failed to send request: {}", err.to_string()); - return Ok(get_informative_error_response(&err.to_string())); + log::error!("Failed to send request: {}", err); + // `authority` was moved into the uri builder above; the host of + // the rebuilt `uri` is the same portless hostname. + let failing_host = uri.host(); + let exclude_url = build_exclude_url(failing_host, gui_base_url.as_deref()); + return Ok(get_informative_error_response( + &err.to_string(), + failing_host, + exclude_url.as_deref(), + )); } }; @@ -450,36 +568,96 @@ pub(crate) async fn serve( let new_response = Response::from_parts(parts, new_new_body); if is_html { - let (sender_rewriter, receiver_rewriter) = crossbeam_channel::unbounded::(); + // Bounded so the whole backpressure chain holds: client ← response body + // ← rewriter ← this channel ← upstream. Before, every hop here was + // unbounded and the entire document buffered in memory. + let (sender_rewriter, receiver_rewriter) = tokio::sync::mpsc::channel(32); // Resolve the URL-scoped payloads up-front so the rewriter can prepend // them inside before any page scripts execute: the uBO scriptlet // and the procedural cosmetic filters (both URL-specific, not dependent - // on collected IDs/classes). The end-of-body cosmetic lookup still runs - // for hide/style selectors, which do depend on collected IDs/classes. + // on collected IDs/classes). This is the single `url_cosmetic_resources` + // lookup for the page — the end-of-body pass only resolves the generic + // class/id-indexed selectors on top of it, using the exception set + // carried in this result. let head_cosmetics = adblock_requester - .get_cosmetic_response(match_url.clone(), Vec::new(), Vec::new()) + .get_cosmetic_response(match_url.clone()) .await; + // Userscripts are matched against the same canonical URL the adblock + // engine uses. The store is consulted per request rather than captured + // once per proxy start, so scripts added or toggled in the web UI apply + // to the very next page load without a reload. + let page_url = Url::parse(&match_url).ok(); + let matched_user_scripts = if user_scripts.store.is_empty() { + Vec::new() + } else { + match &page_url { + Some(url) => user_scripts.store.matching(url), + None => { + log::debug!("Not matching userscripts against invalid URL {match_url}"); + Vec::new() + } + } + }; + + // Only scripts matched on this page receive capabilities. The signed + // page URL lets endpoints recheck matching without confusing their own + // reserved path with the page that requested injection. + let endpoint_tokens = matched_user_scripts + .iter() + .filter_map(|script| { + page_url.as_ref().map(|url| { + ( + script.file_name.clone(), + super::gm::token::mint( + url, + &script.file_name, + &user_scripts.endpoint_signing_key, + ), + ) + }) + }) + .collect(); + let rewriter = Rewriter::new( - match_url.clone(), adblock_requester, receiver_rewriter, sender, statistics, csp_nonce.expect("csp_nonce is Some whenever is_html"), - head_cosmetics.injected_script, - head_cosmetics.procedural_filters, + head_cosmetics, scriptlet_debug_logging, + matched_user_scripts, + user_scripts.gm_storage.clone(), + endpoint_tokens, ); tokio::task::spawn_blocking(|| rewriter.rewrite()); - while let Ok(Some(chunk)) = response.chunk().await { - if let Err(_err) = sender_rewriter.send(chunk) { - break; + // Drain the upstream body on its own task so the response (headers plus + // the streaming rewritten body) is returned to the client immediately. + // Holding the response until the whole document had been downloaded + // meant the browser could not start parsing — or prefetching + // subresources — until the very last upstream byte had arrived. + tokio::spawn(async move { + loop { + match response.chunk().await { + Ok(Some(chunk)) => { + if sender_rewriter.send(Ok(chunk)).await.is_err() { + break; + } + } + Ok(None) => break, + Err(error) => { + let _ = sender_rewriter + .send(Err(std::io::Error::other(error))) + .await; + break; + } + } } - } + }); return Ok(new_response); } @@ -495,23 +673,106 @@ pub(crate) async fn serve( Ok(new_response) } -fn get_informative_error_response(reason: &str) -> Response { +/// Minimal HTML escaping for text interpolated into the proxy's error page. +/// The failure reason comes from reqwest and can embed attacker-influenced +/// URLs; the failing host is client-controlled. +fn escape_html(s: &str) -> String { + let mut escaped = String::with_capacity(s.len()); + for character in s.chars() { + match character { + '&' => escaped.push_str("&"), + '<' => escaped.push_str("<"), + '>' => escaped.push_str(">"), + '"' => escaped.push_str("""), + '\'' => escaped.push_str("'"), + _ => escaped.push(character), + } + } + escaped +} + +/// The web GUI link that pre-fills the exclusion flow for the failing host, +/// when both the host and a reachable GUI base URL are known. The host is +/// percent-encoded into the `host` query parameter. +fn build_exclude_url(failing_host: Option<&str>, gui_base_url: Option<&str>) -> Option { + match (failing_host, gui_base_url) { + (Some(host), Some(base)) => Some(format!( + "{base}/exclude?host={}", + url::form_urlencoded::byte_serialize(host.as_bytes()).collect::() + )), + _ => None, + } +} + +/// Markup substituted for `#{exclude_section}#` in the error page: the failing +/// host, plus an "Exclude this host" link when the GUI is reachable. Empty +/// when the failing host is unknown. +fn build_exclude_section(failing_host: Option<&str>, exclude_url: Option<&str>) -> String { + let host = match failing_host { + Some(host) => host, + None => return String::new(), + }; + + let mut section = format!( + "

Failing host: \ + {}

", + escape_html(host) + ); + if let Some(exclude_url) = exclude_url { + // `exclude_url` is percent-encoded by construction; escaping it again + // hardens the attribute against any future construction change. + section.push_str(&format!( + "Exclude this host", + escape_html(exclude_url) + )); + } + + section +} + +fn get_informative_error_response( + reason: &str, + failing_host: Option<&str>, + exclude_url: Option<&str>, +) -> Response { let mut response_body = String::from(include_str!("../../resources/head.html")); - response_body += - &include_str!("../../resources/error.html").replace("#{request_error_reason}#", reason); + response_body += &include_str!("../../resources/error.html") + .replace("#{request_error_reason}#", &escape_html(reason)) + .replace( + "#{exclude_section}#", + &build_exclude_section(failing_host, exclude_url), + ); - let mut response = Response::new(Body::from(response_body)); + let mut response = Response::new(full_body(response_body)); *response.status_mut() = http::StatusCode::BAD_GATEWAY; response } -fn get_blocked_by_privaxy_response(blocker_result: BlockerResult) -> Response { +fn get_blocked_by_privaxy_response(blocker_result: BlockerResult) -> Response { // We don't redirect to network urls due to security concerns. if let Some(resource) = blocker_result.redirect { - let response = Response::new(Body::from(resource)); - - return response; + // adblock-rust supplies a base64 data URL, including for binary stubs. + // Serve its bytes locally rather than sending the URL as response text. + if let Some((metadata, encoded)) = resource + .strip_prefix("data:") + .and_then(|data| data.split_once(',')) + { + if let Some(content_type) = metadata.strip_suffix(";base64") { + if let (Ok(content_type), Ok(bytes)) = ( + HeaderValue::from_str(content_type), + base64::engine::general_purpose::STANDARD.decode(encoded), + ) { + let mut response = Response::new(full_body(bytes)); + response + .headers_mut() + .insert(http::header::CONTENT_TYPE, content_type); + return response; + } + } + } + log::warn!("Unable to decode an adblock replacement resource"); } let filter_information = match blocker_result.filter { @@ -523,24 +784,32 @@ fn get_blocked_by_privaxy_response(blocker_result: BlockerResult) -> Response Response { - let mut response = Response::new(Body::empty()); +fn get_empty_response(status_code: http::StatusCode) -> Response { + let mut response = Response::new(empty_body()); *response.status_mut() = status_code; response } -async fn write_proxied_body(mut response: reqwest::Response, mut sender: hyper::body::Sender) { - while let Ok(Some(chunk)) = response.chunk().await { - // The other end is broken, let's abort immediately. - if let Err(_err) = sender.send_data(chunk).await { - break; +async fn write_proxied_body(mut response: reqwest::Response, sender: BodySender) { + loop { + match response.chunk().await { + Ok(Some(chunk)) => { + if sender.send(Ok(Frame::data(chunk))).await.is_err() { + break; + } + } + Ok(None) => break, + Err(error) => { + let _ = sender.send(Err(std::io::Error::other(error))).await; + break; + } } } } @@ -548,23 +817,34 @@ async fn write_proxied_body(mut response: reqwest::Response, mut sender: hyper:: /// When we receive a request to perform an upgrade, we need to initiate a bidirectional tunnel. /// We upgrade the request towards the target server, towards the proxy end and we connect both through a duplex stream. async fn perform_two_ends_upgrade( - request: Request, + mut request: Request, uri: Uri, - hyper_client: hyper::Client>, -) -> Response { - let (mut duplex_client, mut duplex_server) = tokio::io::duplex(32); + hyper_client: UpgradeClient, +) -> Response { + // The duplex buffer caps how many bytes can be in flight between the two + // `copy_bidirectional` tasks bridging client and upstream. A tiny buffer + // forces the tunnel to ping-pong wakeups every few bytes, throttling + // WebSocket throughput; 64 KiB matches a typical socket buffer. + let (mut duplex_client, mut duplex_server) = tokio::io::duplex(64 * 1024); // Captured for log context; `uri` is moved into `new_request` below. let request_uri = uri.to_string(); - let mut new_request = Request::new(Body::empty()); - *new_request.headers_mut() = request.headers().clone(); - *new_request.uri_mut() = uri; + let client_upgrade = hyper::upgrade::on(&mut request); + let (mut parts, body) = request.into_parts(); + parts.uri = uri; + // Let the client build Host from the destination, including when DoH + // policy redirects an upgrade attempt to a different resolver. + parts.headers.remove(http::header::HOST); + let new_request = Request::from_parts(parts, boxed_incoming(body)); let client_uri = request_uri.clone(); tokio::spawn(async move { - match hyper::upgrade::on(request).await { - Ok(mut upgraded_client) => { + match client_upgrade.await { + Ok(upgraded_client) => { + // hyper 1.0's `Upgraded` speaks hyper's own IO traits, so wrap + // it in `TokioIo` to bridge to tokio's `AsyncRead`/`AsyncWrite`. + let mut upgraded_client = TokioIo::new(upgraded_client); let _result = tokio::io::copy_bidirectional(&mut upgraded_client, &mut duplex_client).await; } @@ -601,14 +881,15 @@ async fn perform_two_ends_upgrade( request_uri, response.status() ); - return response; + return response.map(boxed_incoming); } let mut new_response = get_empty_response(StatusCode::SWITCHING_PROTOCOLS); *new_response.headers_mut() = response.headers().clone(); match hyper::upgrade::on(response).await { - Ok(mut upgraded_server) => { + Ok(upgraded_server) => { + let mut upgraded_server = TokioIo::new(upgraded_server); tokio::spawn(async move { let _result = tokio::io::copy_bidirectional(&mut upgraded_server, &mut duplex_server).await; @@ -625,3 +906,210 @@ async fn perform_two_ends_upgrade( new_response } + +#[cfg(test)] +mod tests { + use super::*; + use http::{HeaderMap, HeaderValue, Uri}; + + fn headers(pairs: &[(&str, &str)]) -> HeaderMap { + let mut map = HeaderMap::new(); + for (name, value) in pairs { + let header_name = http::header::HeaderName::from_bytes(name.as_bytes()).unwrap(); + map.insert(header_name, HeaderValue::from_str(value).unwrap()); + } + map + } + + #[test] + fn websocket_upgrade_takes_precedence_over_fetch_destination() { + let headers = headers(&[("upgrade", "WebSocket"), ("sec-fetch-dest", "empty")]); + assert_eq!(request_type_from_headers(&headers), "websocket"); + } + + #[test] + fn csp_augments_element_directives_without_changing_their_fallbacks() { + let policy = + "script-src 'self'; script-src-elem 'none'; style-src 'self'; style-src-elem 'none'"; + assert_eq!( + augment_csp_value(policy, "abc"), + "script-src 'self'; script-src-elem 'none' 'nonce-abc'; style-src 'self'; style-src-elem 'none' 'nonce-abc'" + ); + assert_eq!( + augment_csp_value("default-src 'self'; script-src-elem 'unsafe-inline'", "abc"), + "default-src 'self' 'nonce-abc'; script-src-elem 'unsafe-inline'" + ); + } + + #[tokio::test] + async fn replacement_resources_serve_decoded_bytes_and_mime_types() { + for (mime, bytes) in [ + ("application/javascript", b"void 0;".as_slice()), + ("image/png", &[0, 255, 16][..]), + ] { + let result = BlockerResult { + matched: true, + important: false, + redirect: Some(format!( + "data:{mime};base64,{}", + base64::engine::general_purpose::STANDARD.encode(bytes) + )), + exception: None, + filter: None, + rewritten_url: None, + }; + let response = get_blocked_by_privaxy_response(result); + assert_eq!(response.status(), StatusCode::OK); + assert_eq!(response.headers()[http::header::CONTENT_TYPE], mime); + let body = response.into_body().collect().await.unwrap().to_bytes(); + assert_eq!(body.as_ref(), bytes); + } + } + + #[test] + fn request_type_from_sec_fetch_dest() { + let cases = [ + ("document", "document"), + ("frame", "sub_frame"), + ("iframe", "sub_frame"), + ("script", "script"), + ("serviceworker", "script"), + ("worker", "script"), + ("style", "stylesheet"), + ("image", "image"), + ("font", "font"), + ("audio", "media"), + ("video", "media"), + ("object", "object"), + ("embed", "object"), + ("report", "ping"), + ("empty", "xmlhttprequest"), + ("something-unknown", "other"), + ]; + for (dest, expected) in cases { + let h = headers(&[("sec-fetch-dest", dest)]); + assert_eq!( + request_type_from_headers(&h), + expected, + "sec-fetch-dest: {dest}" + ); + } + } + + #[test] + fn request_type_falls_back_to_accept() { + assert_eq!( + request_type_from_headers(&headers(&[("accept", "text/html,*/*")])), + "document" + ); + assert_eq!( + request_type_from_headers(&headers(&[("accept", "text/css")])), + "stylesheet" + ); + assert_eq!( + request_type_from_headers(&headers(&[("accept", "image/png")])), + "image" + ); + assert_eq!( + request_type_from_headers(&headers(&[("accept", "application/javascript")])), + "script" + ); + assert_eq!( + request_type_from_headers(&headers(&[("accept", "application/octet-stream")])), + "other" + ); + // No usable headers at all. + assert_eq!(request_type_from_headers(&HeaderMap::new()), "other"); + } + + #[test] + fn url_for_matching_strips_default_ports() { + let strip = |s: &str| url_for_matching(&s.parse::().unwrap()); + assert_eq!( + strip("https://example.com:443/a/b"), + "https://example.com/a/b" + ); + assert_eq!(strip("http://example.com:80/a"), "http://example.com/a"); + // Non-default ports are preserved. + assert_eq!( + strip("https://example.com:8443/a"), + "https://example.com:8443/a" + ); + // Missing path defaults to "/". + assert_eq!(strip("https://example.com:443"), "https://example.com/"); + } + + #[test] + fn csp_nonce_has_expected_shape() { + let nonce = generate_csp_nonce(); + // 16 bytes -> 22 url-safe base64 chars, no padding. + assert_eq!(nonce.len(), 22); + assert!(!nonce.contains('=')); + assert!(nonce + .chars() + .all(|c| c.is_ascii_alphanumeric() || c == '-' || c == '_')); + } + + #[test] + fn csp_appends_nonce_to_script_src() { + // script-src gets the nonce directly; with no style-src present, the + // style path falls back to default-src and adds the nonce there too. + let out = augment_csp_value("default-src 'self'; script-src 'self'", "abc"); + assert_eq!( + out, + "default-src 'self' 'nonce-abc'; script-src 'self' 'nonce-abc'" + ); + } + + #[test] + fn csp_falls_back_to_default_src() { + let out = augment_csp_value("default-src 'self'", "abc"); + assert_eq!(out, "default-src 'self' 'nonce-abc'"); + } + + #[test] + fn csp_skips_when_unsafe_inline_without_nonce() { + // Appending a nonce would silently break the site's own inline scripts, + // so the value must be left untouched. + let out = augment_csp_value("script-src 'self' 'unsafe-inline'", "abc"); + assert_eq!(out, "script-src 'self' 'unsafe-inline'"); + } + + #[test] + fn csp_drops_trusted_types_directives() { + let out = augment_csp_value( + "default-src 'self'; require-trusted-types-for 'script'; trusted-types foo", + "abc", + ); + assert!(!out.contains("trusted-types")); + assert!(out.contains("'nonce-abc'")); + } + + #[test] + fn exclude_section_escapes_hostile_host() { + let section = build_exclude_section(Some(""), None); + assert!(section.contains("<script>alert(1)</script>")); + assert!(!section.contains("