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
• 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; DIRECT";
if (url.substring(0, 4) == "ftp:")
return "PROXY; DIRECT";
if (url.substring(0, 7) == "gopher:")
return "PROXY; DIRECT";
return "DIRECT";

Forex Trading