Pages

Proxy Auto Configuration (PAC)

• Proxy Auto Configuration is a script (javascript), residing at
an easy-to-remember URL.
• The browser executes the javascript function before each
request.
• The PAC script returns a proxy (or list of proxies) that the
browser should use for the request.
• Useful for simple load-balancing of multiple proxies.
• Also useful if proxy/proxies are unstable.

Sample PAC Script
function FindProxyForURL(url, host)
{
if (isPlainHostName(host))
return "DIRECT";
if (!isResolvable(host))
return "DIRECT";
if (url.substring(0, 5) == "http:")
return "PROXY random.us.ircache.net:3128; DIRECT";
if (url.substring(0, 4) == "ftp:")
return "PROXY random.us.ircache.net:3128; DIRECT";
if (url.substring(0, 7) == "gopher:")
return "PROXY random.us.ircache.net:3128; DIRECT";
return "DIRECT";
}

Forex Trading