IPv6 extension functions (isInNetEx, dnsResolveEx, myIpAddressEx)
medium
The Ex functions come from Microsoft's IPv6 extensions to the PAC format. Chromium and WinHTTP implement them; Firefox does not. On an engine without them the call throws and the request is treated as a script failure.
Why it matters
isInNetEx, dnsResolveEx, myIpAddressEx, isResolvableEx, sortIpAddressList and
getClientVersion are not part of the original PAC function set. Microsoft defined them for
IPv6 support; Chromium added implementations; Firefox has declined to. A PAC that calls
them unconditionally fails on Firefox with a ReferenceError (silent DIRECT). If they are
needed, guard the call with typeof isInNetEx === "function" and provide a fallback path.
How to fix
Prefer the portable v1 functions; if an Ex function is required, guard it with typeof checks and provide a fallback branch.
Examples
Bad
function FindProxyForURL(url, host) {
if (isInNetEx(host, "fd00::/8")) {
return "DIRECT";
}
return "PROXY proxy.corp.example:8080";
}
Open bad example in checkerGood
function FindProxyForURL(url, host) {
if (typeof isInNetEx === "function" && isInNetEx(host, "fd00::/8")) {
return "DIRECT";
}
if (shExpMatch(host, "fd*:*")) {
return "DIRECT";
}
return "PROXY proxy.corp.example:8080";
}
Open good example in checkerEngine behaviour
| Engine | Behaviour | Source |
|---|---|---|
| chromium | The Ex functions are implemented (isResolvableEx in the JS helper library, dnsResolveEx/myIpAddressEx/sortIpAddressList as native bindings in proxy_resolver_v8.cc). | code, verified 2026-10-04 · ref |
| firefox | Ex functions are not implemented. | expert, unverified |
| pacparser | Ex functions are not implemented. | expert, unverified |
| winhttp | Ex functions are defined by Microsoft's IPv6 extensions and implemented. | doc, unverified |
Related rules
- FindProxyForURLEx entry point PAC-K004
- isInNet called with an IPv6 address PAC-K014
- Call to a function that is not defined PAC-E005