Cisco Cisco Web Security Appliance S360 Guía Para Resolver Problemas
What is a Proxy Pac file and are there any
examples?
examples?
Document ID: 118076
Contributed by Khoa Nguyen and Siddharth Rajpathak, Cisco TAC
Engineers.
Engineers.
Jul 24, 2014
Contents
Question:
Question:
What is a Proxy Pac file, and are there any examples?
Environment: Cisco Web Security Appliance
Note: This Knowledge Base article references software which is not maintained or supported by Cisco. The
information is provided as a courtesy for your convenience. For further assistance, please contact the software
vendor.
information is provided as a courtesy for your convenience. For further assistance, please contact the software
vendor.
Reference Link: JavaScript or JScript Auto−Proxy Example Files
JavaScript or JScript Auto−Proxy Example Files
The following scripts provide examples of how a '.pac' file could be used to specify an auto−proxy URL. To
use these functions, you must change the proxy names, port numbers, and IP addresses.
use these functions, you must change the proxy names, port numbers, and IP addresses.
The isInNet, isResolvable, and dnsResolve functions query a DNS server
1.
References to Object Model objects, properties, or methods cause the proxy auto−configuration file to
fail silently. For example, the references window.open(...), alert(...), and password(...) all cause the
proxy auto−configuration file to fail on Internet Explorer.
fail silently. For example, the references window.open(...), alert(...), and password(...) all cause the
proxy auto−configuration file to fail on Internet Explorer.
2.
Example 1: Local hosts connect direct, all others connect via proxy
The following function checks to see whether the hostname is a local host, and if it is, whether the connection
is direct. If the hostname is not a local host, the connection is through the proxy (proxy).
function FindProxyForURL(url, host)
{
if (isPlainHostName(host))
return "DIRECT";
else
return "PROXY proxy:80";
}
is direct. If the hostname is not a local host, the connection is through the proxy (proxy).
function FindProxyForURL(url, host)
{
if (isPlainHostName(host))
return "DIRECT";
else
return "PROXY proxy:80";
}