Available on crate feature
pac only.Expand description
Structs§
- BoaEvaluator
pac-boa PacEvaluatoronboa_engine. PrefersFindProxyForURL;FindProxyForURLExonly if it is the sole entry point (Ex-only hostfns are not registered).- PacPolicy
- Safety envelope for PAC evaluation (
pac-boa; ignored byWinHttpPacResolver). - PacScript
- PAC script body (newtype so “this is JS that will run” stays visible in signatures).
- WinHttp
PacResolver Windows and pac-windows-native - PAC/WPAD via
WinHttpGetProxyForUrlEx. Reuse one session; the cache it does not bound is described onresolve.
Enums§
- PacRequirement
- What
requirementsays aProxyModeneeds before routing. - WinHttp
PacSource Windows and pac-windows-native - Where WinHTTP looks for the PAC script (
WINHTTP_AUTOPROXY_OPTIONS— not a body).
Constants§
- DEFAULT_
PAC_ LOOP_ LIMIT - The default loop-iteration cap (10M). Hitting it aborts with
Error::PacEvaluation. Unlike the two constants below this one is notboa_engine’s default:RuntimeLimits::default()leavesloop_iterationatu64::MAX, so an unboundedwhileis left to the timeout — which releases the caller without stopping the script (seePacPolicy::with_timeout). - DEFAULT_
PAC_ RECURSION_ LIMIT - The default function-call recursion depth (512) —
boa_engine’s own default, kept so stating it is not a behaviour change. Tighten withPacPolicy::with_recursion_limit. - DEFAULT_
PAC_ STACK_ SIZE_ LIMIT - The default engine value-stack length (10 240) — also
boa_engine’s own default. Entry count, not bytes or OS stack size — in particular not the native stack the parser recurses on, whichPacPolicycannot bound at all. - DEFAULT_
PAC_ TIMEOUT - The default evaluation timeout, five seconds.
- DEFAULT_
WINHTTP_ PAC_ TIMEOUT Windows and pac-windows-native - Default native resolution budget (5 s) — same as
DEFAULT_PAC_TIMEOUT, but also covers WPAD discovery and script download.
Traits§
- PacEvaluator
- macOS may wrap
CFNetworkCopyProxiesForAutoConfigurationScript.PacPolicyon the impl.
Functions§
- evaluate
- Evaluate
scriptforurlunderpolicy(sanitize_urlfirst). - evaluate_
with_ host - Like
evaluate, but the caller chooseshost(urlis still sanitized). - parse_
find_ proxy_ result - Parse a
FindProxyForURLreturn string into an ordered fallback chain. - requirement
- What
modeneeds beforeevaluatecan be called for it. - sanitize_
url - Chromium
SanitizeUrl: strip userinfo+fragment; path+query only forhttps/wss. Not aPacPolicyknob. CustomPacEvaluatorimpls should still sanitize.