下面贴几张关键部位的照片和pac脚本代码供广大朋友分析:
先附上代码: // --------------------------------------------------------------------
// Concept:
// to find out if we have an exception, we'll check the most common
// exceptions first.
// Complex checkings are done at the end of the decision tree.
// Attention: The function quits with the statement "return", which means
// there is no need for confusin if-then-else clauses
// --------------------------------------------------------------------
function FindProxyForURL(url, host)
{
// Exceptions:
// - Target-Address is a Hostname without Domain-suffix
// - Target-Address = localhost via IP 127.0.0.1
// - Target-Address = localhost via name
// - Target-Address is in '.domain'
// - Target-Address is in '.mbholding.intra'
if ( isPlainHostName(host) ||
localHostOrDomainIs(host, "127.0.0.1") ||
dnsDomainIs(host, "localhost") ||
dnsDomainIs(host, ".ioties.intra") ||
dnsDomainIs(host, ".iot") ||
dnsDomainIs(host, ".domain") ||
dnsDomainIs(host, ".iotgroup.in") ||
dnsDomainIs(host, ".mbholding.intra") ) {
return "DIRECT";
} // *** Exceptions: Target-Addresses in Segment 172.16.x.x/16
// *** CAREFULL: This may cause a lot of NSLookups!
if (isInNet ( host, "172.16.0.0", "255.255.0.0")||
isInNet ( host, "10.1.1.0", "255.255.255.0"))
{
return "DIRECT";
}
// No Exception: connect via proxy
// return "PROXY ger-ham-bc.mbholding.intra:8000";
return "PROXY 10.1.1.6:3128;PROXY 10.1.1.5:3128;PROXY 10.3.3.5:3128";
}