Cisco Cisco Web Security Appliance S360 Guía Para Resolver Problemas

Descargar
Página de 5
The isPlainHostName function checks to see if there are any dots in the hostname. If so, it returns false;
otherwise, the function returns true.
Note: For a direct connection to local webserver, a domain or subnet match might also be needed. Not all
requests to local webservers are done using just hostnames
Example 2: Hosts inside the firewall connect direct, outside local servers connect via proxy
The following function checks to see whether the host is either a "plain" hostname (meaning the domain name
is not included) or part of a particular domain (.company.com) but the hostname is not either www or home.
function FindProxyForURL(url, host)
 {
 if ((isPlainHostName(host) ||
 dnsDomainIs(host, ".company.com")) &&
 !localHostOrDomainIs(host, "www.company.com") &&
 !localHostOrDoaminIs(host, "home.company.com"))
 return "DIRECT";
 else
 return "PROXY proxy:80";
 }
Note:
The localHostOrDomainIs function is executed only for URLs in the local domain.
• 
The dnsDomainIs function returns true if the domain of the hostname matches the domain given.
• 
Example 3: If host is resolvable, connect direct. Otherwise connect using a proxy.
The following function asks the DNS server to try to resolve the hostname passed to it. If it can, then a direct
connection is made. If it cannot, the connection is made via proxy. This is useful when an internal DNS server
is used to resolve all internal hostnames.
function FindProxyForURL(url, host)
 {
 if (isResolvable(host))
 return "DIRECT";
 else
 return "PROXY proxy:80";
 }
See note on the isResolvable function at the top of the page.
Example 4: If host is in specified subnet, connect direct. Otherwise connect using a proxy.
The following function compares a given IP address pattern and mask with the hostname. This is useful if
certain hosts in a subnet should be connected directly and others should be connected using a proxy.
function FindProxyForURL(url, host)
 {
 if (isInNet(host, "999.99.9.9", "255.0.255.0"))
 return "DIRECT";
 else
 return "PROXY proxy:80";