Reference

PAC & proxy glossary

Plain-language definitions of the terms you'll meet when writing or debugging Proxy Auto-Configuration files.

Terms

Short definitions, with links to the relevant part of the reference.

TermDefinition
PAC file A Proxy Auto-Configuration file: a plain-text JavaScript file containing a single FindProxyForURL function that tells a browser which proxy (if any) to use for each request. See What is a PAC file?
FindProxyForURL The one function every PAC file must define. The browser calls it for each request with the URL and host, and uses the string it returns to route the connection. See Quick start.
Proxy server An intermediary server that forwards your requests to their destination on your behalf, often used for filtering, caching, or security in corporate networks.
DIRECT A return value meaning "connect straight to the destination, no proxy". See Return values.
PROXY host:port A return value routing the request through the named HTTP/HTTPS proxy.
SOCKS / SOCKS4 / SOCKS5 Return values that route traffic through a SOCKS proxy. SOCKS5 adds authentication and UDP/IPv6 support over SOCKS4.
Proxy chain / fallback Multiple semicolon-separated directives in one return string. The browser tries them strictly left to right, moving on only when one is unreachable. See Proxy chaining.
WPAD Web Proxy Auto-Discovery: a mechanism that lets browsers find the PAC file URL automatically via DHCP or DNS, instead of configuring it manually. See WPAD auto-discovery.
wpad.dat The conventional filename for a PAC file served through WPAD auto-discovery.
DHCP Option 252 The DHCP field a server can use to hand clients a WPAD/PAC URL at startup — the fastest WPAD method.
DNS resolution Translating a hostname into an IP address. Several PAC helpers (dnsResolve, isResolvable, isInNet with a hostname) trigger a live lookup that blocks evaluation. See Compute-intensive functions.
RFC 1918 The standard defining private IPv4 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) commonly routed DIRECT in PAC files.
Subnet mask A value like 255.255.0.0 that, with a network address, defines an IP range — used by isInNet().
Shell glob The wildcard pattern syntax used by shExpMatch(): * matches any characters, ? matches one. It is not a regular expression.
MIME type The Content-Type a server sends. PAC files must be served as application/x-ns-proxy-autoconfig or many clients ignore them.
HTTPS path stripping For HTTPS requests, browsers pass only scheme, host, and port to the PAC function — the path and query are removed. Path-based matching only works for plain HTTP. See Troubleshooting.
MITM (man-in-the-middle) An attacker who intercepts traffic. A PAC file fetched over plain HTTP can be swapped by a MITM to reroute all your traffic — serve PAC files over HTTPS. See Security.
Split tunnelling Sending some traffic through the proxy and other traffic directly, based on host, subnet, protocol, or time — the core job of most PAC files.