Available on crate feature
pac only.Expand description
Structs§
- Android
PacResolver Android and pac-android-native - Resolves the
PacconfigurationConnectivityManagerreports by askingProxySelector.getDefault().select(uri). - 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.
Enums§
- PacRequirement
- What
requirementsays aProxyModeneeds before routing.
Constants§
- DEFAULT_
PAC_ TIMEOUT - The default evaluation timeout, five seconds.
- 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 Android and pac-android-native - The native PAC resolver this target has:
AndroidPacResolver.