PAC
acronymnetworkingsecurity
Stands for: Proxy Auto-Config
A JavaScript file that tells a browser which proxy to use per URL.
A Proxy Auto-Config file defines a `FindProxyForURL` function the browser calls for each request, returning which proxy (if any) to use. It allows fine-grained, per-destination proxy rules without hardcoding a single proxy.
A PAC file is JavaScript that a browser runs to decide, per request, which proxy to use. One function receives the URL and host and returns a proxy, a list of fallbacks, or a direct connection. That tiny interface is how organizations have steered traffic for decades, and it long outlived the era it was designed for.
Its persistence is explained by what it can express. Send internal domains direct, route everything else through inspection, bypass a payment provider that breaks under interception, fall back to a second proxy if the first is unreachable, all evaluated on the client without touching the network. Cloud security services still lean on it because it works everywhere a browser does.
The failure modes are worth knowing before deploying one. The function runs on every request, so expensive logic, particularly DNS resolution inside the file, adds latency to all browsing. Ordering matters because the first match wins, so a broad rule placed early silently swallows the specific rules beneath it. And a syntax error can fail closed or fail open depending on the client, which means testing the file matters as much as writing it.
Also known as: pac