PAC-E012 · invalid-proxy-port

Proxy port out of range or not numeric

high · Errors and robustness

A PROXY/SOCKS entry carries a port that is not an integer between 1 and 65535. Browsers discard the entry; when no other entry follows, traffic goes DIRECT.

Why it matters

PROXY proxy.corp.example:99999 is a typo that no engine can use. Chromium fails to parse the host:port pair and drops the entry; if it was the only entry the request is sent directly. pacparser returns the string verbatim, so a pactester-based pipeline does not catch it (lab, 2026-05-20). A port of 0 or a negative or non-numeric value is equally invalid.

How to fix

Use the real listening port of the proxy (1-65535) and test the return string in a browser, not only with pacparser.

Examples

Bad

function FindProxyForURL(url, host) {
  return "PROXY proxy.corp.example:99999";
}
Open bad example in checker

Good

function FindProxyForURL(url, host) {
  return "PROXY proxy.corp.example:8080";
}
Open good example in checker

Engine behaviour

EngineBehaviourSource
chromiumhost:port that does not canonicalise to a valid port yields an invalid ProxyServer; the entry is dropped and the remaining list (empty = DIRECT) is used.code, verified 2026-10-04 · ref
pacparserReturns the malformed string unchanged; no validation.lab, verified 2026-05-20

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