sortIpAddressList()

Microsoft IPv6 extension. Sorts a semicolon-separated IP address list.

sortIpAddressList(list)  →  string

Not used in the real PAC files of the PAC file statistics.

Only in engines that bind it natively (see the availability table).

Example

var sorted = sortIpAddressList(dnsResolveEx(host));

Engine notes

EngineBehaviourSource
winhttpReturns the list separated by ";" with IPv6 addresses in brackets, in an order of its own: "10.1.1.1;fd00::1;192.168.1.1;::1;127.0.0.1" came back as "[::1];10.1.1.1;192.168.1.1;127.0.0.1;[fd00::1]". Spaces after ";" are accepted. An entry that is not an address, or an empty string, gives false.lab, verified 2026-10-11
Windows 11 25H2

Availability

Derived from each engine's vendored helper library plus its native bindings (see engines).
Functionchromium
<=51
chromium
>=52
firefox
all
pacparser
<=1.4.6
pacparser
>=1.5.1
winhttp
11-25H2
wininet
11-25H2
reference
all
sortIpAddressListyesyesnononoyesyesno

Related rules

Last updated: