Extensions to the Navigator Proxy Auto-Config File Format specification to support IPv6 v0.9

The following functions are extensions to the Navigator Proxy Auto-Config File Format specification to enable WPAD scripts to handle IPv6 capable networks:

Predefined Functions and Environment for the JavaScript Function FindProxyforURLEx:

 


 

isResolvableEx(host)

 

This API determines if a given host string can resolve to an IP address

host – string containing the HTTP host that is supplied to FindProxyForUrl

returns TRUE if the host is resolvable to a IPv4 or IPv6 address, FALSE otherwise.

Examples:

isResolvableEx(host);

         is true if the hostname can be resolved to and IP address

isResolvableEx(host);

         is false if the hostname cannot be resolved to an IP address

 


 

isInNetEx(IPaddress, IPprefix)

 

Determines if an IP address is in a specific subnet.

IPaddress – string containing IPv6/IPv4 addresses

IPprefix – string containing colon delimited IP prefix with top n bits specified in the bit field (i.e. 3ffe:8311:ffff::/48 or 123.112.0.0/16).

Returns TRUE if the host is in the same subnet and FALSE otherwise.

Also returns FALSE if prefix is not in the correct format or if addresses and prefixes of different types are used in the comparison (i.e. IPv4 prefix and an IPv6 address).

Examples:

isInNetEx(host, "198.95.249.79/32")

is true iff the IP address of host matches exactly 198.95.249.79.

isInNetEx(host, "198.95.0.0/16")

is true iff the IP address of the host matches 198.95.*.*.

isInNetEx(host, "3ffe:8311:ffff/48")

is true iff the IP address of the host matches 3ffe:8311:fff:*:*:*:*:*

 


dnsResolveEx(host)

 

Resolve a host string to its IP address

host – string containing the HTTP host that is supplied to FindProxyForUrl

returns semi-colon delimited string containing IPv6 and IPv4 addresses or an empty string if host is not resolvable.

FindProxyforURLEx implementers should add code that breaks the string of semi-colon delimited IP addresses into separate addresses.

Examples:

dnsResolveEx("testmachine1")

returns the string "fe80::380c:2e71:f5b9:a3b5%15;fe80::982d:a3b3:97ad:7dd0%9;2001:4898:28:7:982d:a3b3:97ad:7dd0;2001:4898:28:7:adfe:a643:8130:2fdc;fe80::5efe:10.70.92.74%13;3ffe:8311:ffff:f70f:0:5efe:10.70.92.74;10.70.92.74;3ffe:831f:4136:e37e:380c:2e71:f5b9:a3b5".

 


myIPAddressEx()

 

Finds all the IP addresses for localhost

Returns a semi-colon delimited string containing all IP addresses for localhost (IPv6 and/or IPv4), or an empty string if unable to resolve localhost to an IP address.

FindProxyforURLEx implementers should add code that breaks the string of semi-colon delimited IP addresses into separate addresses.

Examples:

  • myIpAddressEx()

    would return the string "fe80::380c:2e71:f5b9:a3b5%15;fe80::982d:a3b3:97ad:7dd0%9;2001:4898:28:7:982d:a3b3:97ad:7dd0;2001:4898:28:7:adfe:a643:8130:2fdc;fe80::5efe:10.70.92.74%13;3ffe:8311:ffff:f70f:0:5efe:10.70.92.74;10.70.92.74;3ffe:831f:4136:e37e:380c:2e71:f5b9:a3b5" if you were running on that host.


sortIpAddressList(IpAddressList)

 

This API sorts a list of IP addresses

IpAddressList - semi-colon delimited string containing IP addresses.

Returns a list of sorted semi-colon delimited IP addresses or an empty string if unable to sort the IP Address list.

FindProxyforURLEx implementers should add code that breaks the string of semi-colon delimited IP addresses into separate addresses.

Examples:

sortIpAddressList(2001:4898:28:3:201:2ff:feea:fc14;

                  157.59.139.22;

                  fe80::5efe:157.59.139.22")

returns

"fe80::5efe:157.59.139.22;2001:4898:28:3:201:2ff:feea:fc14;157.59.139.22"

A list of sorted IP addresses. If there both IPv6 and IPv4 IP addresses are passed as input to this function, then the sorted IPv6 addresses are followed by sorted IPv4 addresses


getClientVersion()

 

Used to get the version of the WPAD processing engine.

Currently this function returns version 1.0. We added this function to allow IT administrators to update their WPAD scripts to use different versions of the WPAD processing engine without causing breaks to their existent deployment. An example of this would be: If we added function foo() to the 2.0 version of the WPAD engine, then administrators can check the version before attempting to call the function. This allows their script to work with client running versions 1.0 and 2.0 of the WPAD engine.

Examples:

getClientVersion()

returns the appropriate versions number of the WPAD engine.

June 2006