有时候 ,我们在访问不同网站的时候 设置不同的代理,可以写下面的脚本给IE或者Firefox。
注意:PROXY 表示http代理。socks5表示socks5代理。就这样。
function FindProxyForURL(url, host)
{
if (localHostOrDomainIs(host, "www.utstar.com.cn"))
return "DIRECT";
else if (localHostOrDomainIs(host, "www.utstar.com"))
return "DIRECT";
else if (isPlainHostName(host))
return "DIRECT";
else if (isInNet(host, "127.0.0.1", "255.255.255.255"))
return "DIRECT";
else if (isInNet(host, "172.0.0.0", "255.0.0.0"))
return "DIRECT";
else if (isInNet(host, "10.0.0.0", "255.0.0.0"))
return "DIRECT";
else if (localHostOrDomainIs(host, "www.aaaa.com"))
return "SOCKS5 127.0.0.1:7070";
else if (localHostOrDomainIs(host, "www.bbbb.com"))
return "SOCKS5 127.0.0.1:7070";
else if (localHostOrDomainIs(host, "www.cccc.com"))
return "SOCKS5 127.0.0.1:7070";
else if (localHostOrDomainIs(host, "dddd.com"))
return "SOCKS5 127.0.0.1:7070";
else
return "PROXY hzproxyisa.utstar.com.cn:1080";
}