Browse Source

Update pac

pull/380/head
自由上网 8 years ago
committed by GitHub
parent
commit
7c6405ab74
  1. 30
      pac

30
pac

@ -2628,6 +2628,25 @@ var direct = 'DIRECT;';
var hasOwnProperty = Object.hasOwnProperty;
var servlist = ["PROXY 162.208.8.9:25; ","PROXY 162.208.8.88:25; ","PROXY 162.208.8.82:25; ","PROXY 192.243.111.43:25; ","PROXY 192.243.111.41:25; ","PROXY 192.243.111.39:25; ","PROXY 192.243.111.226; "];
function ip2int(ip_string) {
var REG =/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;
var result = REG.exec(ip_string);
if (result!=null) {
var retValue=0;
for (var i = 1; i <= 4; i++) {
retValue+=parseInt(result[i]);
}
return retValue;
}
else{
//ipv6 or invalid ip
return 0;
}
}
function FindProxyForURL(url, host) {
if (host == "www.haosou.com") {
return "PROXY 360.itzmx.com:80";
@ -2641,7 +2660,16 @@ function FindProxyForURL(url, host) {
if (url.indexOf('http://') == 0)
return "PROXY 360.itzmx.com:80";
if (hasOwnProperty.call(domains, suffix)) {
return proxy;
var myip=myIpAddress();
var ipint=ip2int(myip);
var ii = ipint % servlist.length;
if(ii==servlist.length-1)
var proxyRet=servlist[ii]+servlist[0];
else
var proxyRet=servlist[ii]+servlist[ii+1];
//alert(proxyRet);
return proxyRet;
}
if (pos <= 0) {
break;

Loading…
Cancel
Save