You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(net): SOCKS5 and PAC proxy support for all outbound connections (#145)
Adds proxy support to every outbound HTTP client, completing the
corporate-network story started by the custom-CA work (#134) through the
same `driven-tls` seam.
## Modes (KV-stored `global` settings, serde-default - NO migration)
- **system** (default): unchanged - reqwest env-proxy pickup (DESIGN
5.8.7).
- **none**: explicit `.no_proxy()` everywhere - bypasses env proxies
too.
- **manual**: one proxy URL (`http://`, `https://`, `socks5://`,
`socks5h://` - socks5h resolves DNS proxy-side); reqwest `socks` feature
enabled on both workspace reqwest 0.12 and the updater's reqwest 0.13.
- **pac**: PAC file URL or local path, compiled with an embedded
pure-Rust JS engine (boa 0.20), evaluated per-URL via `Proxy::custom`
with a 256-entry per-HOST LRU. Standard helpers implemented
(isPlainHostName, dnsDomainIs, localHostOrDomainIs, dnsDomainLevels,
shExpMatch, dnsResolve, isResolvable, myIpAddress, isInNet); date/time
predicates (weekdayRange/dateRange/timeRange) are defined-but-false
stubs.
## Semantics + documented caveats
- CONFIG failures fail closed at settings-save AND client build (bad
URL, unfetchable/uncompilable PAC): clients are never built silently
unproxied. A corrupt stored mode string degrades to `system` (the
historical default).
- RUNTIME PAC eval errors (e.g. a DNS failure mid-eval) log a warning
and go direct for that request - browser-standard PAC failure behavior.
- The PAC realm is pure ECMAScript (no fetch/fs/process); DNS via the
helpers only. There is deliberately NO JS execution watchdog yet
(admin-configured input; LRU bounds eval count) - future hardening if
untrusted PAC ever becomes possible. DNS helpers use OS-resolver
timeouts.
- Cache keys on host only: a PAC branching on scheme/path gets the
per-host decision (endorsed pragmatic subset).
- Updater: PAC evaluates per-URL there too via a version-neutral engine
handle; CA certs + proxy fold into ONE configure_client closure (the
plugin keeps only the last).
- CLI: env proxy + `DRIVEN_PROXY_URL` (manual) only; PAC unsupported
there.
- deny.toml: `paste` (RUSTSEC-2024-0436, unmaintained build-time
proc-macro via boa) ignored with justification; `lru` at 0.16.3+ (clears
RUSTSEC-2026-0002).
- New IPC `validate_proxy` + Settings UI proxy section (mode select,
conditional inputs, inline validation), localized, vitest mount
coverage.
Refs #34
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01QZQVP2tUuTLh8oL31D8heC
0 commit comments