PAC-E002 · missing-findproxyforurl

No FindProxyForURL function

critical · Errors and robustness

The file parses but defines no function called exactly FindProxyForURL. Engines bind by that exact, case-sensitive name; nothing else is called.

Why it matters

Engines look up a global function named FindProxyForURL (case-sensitive) and call it for every request. findProxyForUrl, FindProxyForUrl or findproxyforurl are ordinary, unused functions. The result is the same as a parse error: the engine reports a script failure and the client goes DIRECT.

The PAC v2 entry point FindProxyForURLEx is only honoured by WinHTTP-based clients (see PAC-K004); a file that defines only the Ex form is also missing the standard entry point for Chromium and Firefox.

How to fix

Rename the function to FindProxyForURL (capital F, P, F, URL).

Examples

Bad

function findProxyForUrl(url, host) {
  return "DIRECT";
}
Open bad example in checker

Good

function FindProxyForURL(url, host) {
  return "DIRECT";
}
Open good example in checker

Engine behaviour

EngineBehaviourSource
chromiumFindProxyForURL is required; its absence is a script error and connections go DIRECT.code, verified 2026-10-04 · ref

Source: code = read in the engine's source, doc = vendor documentation, lab = observed in a lab run, expert = practitioner knowledge, not yet verified.

Related rules

References