Available on crate feature
pac only.Expand description
Structs§
- PacPolicy
- Safety envelope for PAC evaluation (
pac-quickjsandpac-subprocess; ignored by the native resolvers, which hand the script to the OS). - PacResolver
- Routes a whole
ProxyConfigto whichever PAC engine answers its mode. - PacScript
- PAC script body (newtype so “this is JS that will run” stays visible in signatures).
- Subprocess
Evaluator pac-subprocess PacEvaluatorthat runs each evaluation in a fresh worker process and kills it at the deadline.- WinHttp
PacResolver Windows and pac-windows-native - PAC/WPAD via
WinHttpGetProxyForUrlEx. Reuse one session; the cache it does not bound is described onresolve.
Enums§
- Auto
Proxy Reset Windows and pac-windows-native - What
WinHttpPacResolver::reset_auto_proxydid. - 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_ 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. - QUICKJS_
AVAILABLE - Whether this build carries QuickJS, so that
evaluateruns a script rather than answeringError::PacEngineUnavailable:pac-quickjson a target other than Android and iOS. Lets a caller pick an engine before calling, without its owncfg.
Traits§
- PacEvaluator
- A replaceable engine that evaluates a PAC script for one URL.
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 and fragment always, and path and query only forhttps/wss. Not aPacPolicyknob. CustomPacEvaluatorimpls should still sanitize.
Type Aliases§
- Native
PacResolver Windows and pac-windows-native - The native PAC resolver this target has:
WinHttpPacResolveron Windows,CfNetworkPacResolveron macOS and iOS,AndroidPacResolveron Android, whichever the matchingpac-*-nativefeature (orpac-native) compiled in.