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; dnsResolveEx, isInNetEx, myIpAddressEx, sortIpAddressList, isResolvableEx and getClientVersion are undefined. | lab, verified 2026-10-12 |
| pacparser | Four of the six are present (dnsResolveEx, isInNetEx, myIpAddressEx, isResolvableEx); sortIpAddressList and getClientVersion are undefined. Measured in 1.4.6 and 1.5.3. | lab, verified 2026-10-04 |
| winhttp | All six are present (isResolvableEx, isInNetEx, dnsResolveEx, myIpAddressEx, sortIpAddressList, getClientVersion). dnsResolveEx lists IPv4 and IPv6 addresses separated by ';' with IPv6 in brackets, and returns false for a name that does not resolve; isInNetEx needs a prefix such as /8, does not look up host names and is false for /0; getClientVersion returns "1.0". | lab, verified 2026-10-11 |
The PAC functions this rule is about
dnsResolveEx(): Microsoft IPv6 extension. Returns a semicolon-separated list of IPv4 and IPv6 addresses, or an empty string (false in Windows).myIpAddressEx(): Microsoft IPv6 extension. Semicolon-separated list of the computer's addresses; which addresses and in which order depends on the engine.isResolvableEx(): Microsoft IPv6 extension. True if the host resolves to any IPv4 or IPv6 address.isInNetEx(): Microsoft IPv6 extension. True if ip is inside the CIDR prefix, e.g. isInNetEx(ip, "2001:db8::/32").sortIpAddressList(): Microsoft IPv6 extension. Sorts a semicolon-separated IP address list.
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