这是一个proxy.pac脚本.用于我的一个生产环境。通过特定用户的接入,加速访问!写过几次用的时候总不记得放在哪儿了,在此记录备用。
function FindProxyForURL(url, host)
{
if ( shExpMatch(url,"*.web1*.com/*") || shExpMatch(url,"*.web2*.com/*") && !isResolvable(host) )
return "PROXY d.d.d.d:8088;" +
"PROXY b.b.b.b:8088;" +
"PROXY c.c.c.c:8080;" +
"PROXY a.a.a.a:8088";
if ( shExpMatch(url,"*.web3*.com/*") || shExpMatch(url,"*.web4*.com/*") && !isResolvable(host))
return "PROXY a.a.a.a:8088;" +
"PROXY b.b.b.b:8088;" +
"PROXY c.c.c.c:8080;" +
"PROXY d.d.d.d:8088";
if ( shExpMatch(url,"*.web5*.com/*") || shExpMatch(url,"*.web6*.com/*") && !isResolvable(host) )
return "PROXY b.b.b.b:8088;" +
"PROXY d.d.d.d:8088;" +
"PROXY c.c.c.c:8080;" +
"PROXY a.a.a.a:8088";
if ( shExpMatch(url,"*.web7*.com/*") || shExpMatch(url,"*.web8*.com/*") && !isResolvable(host))
return "PROXY c.c.c.c:8080;" +
"PROXY b.b.b.b:8088;" +
"PROXY d.d.d.d:8088;" +
"PROXY a.a.a.a:8088";
if ( shExpMatch(url,"*.web9*.com/*") || shExpMatch(url,"*.a33*.com/*") && !isResolvable(host))
return "PROXY d.d.d.d:8088;" +
"PROXY b.b.b.b:8088;" +
"PROXY c.c.c.c:8080;" +
"PROXY a.a.a.a:8088";
if ( shExpMatch(url,"*.fbccccc.com/*") || shExpMatch(url,"*.foooo.com/*") && !isResolvable(host) )
return "PROXY b.b.b.b:8088;"
else
return "DIRECT";
}