资源描述:
《重庆市事业单位综合基础知识.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、functionFindProxyForURL(url,host){if(isPlainHostName(host))return'DIRECT';if(!shExpMatch(url,'http*'))return'DIRECT';varip=dnsResolve(host);//nodnsresultif(!ip)return'PROXY127.0.0.1:8083;';//ipv6if(shExpMatch(ip,'*:*'))return'DIRECT';//localelseif(isInNet(ip,'12
2、7.0.0.0','255.0.0.0'))return'DIRECT';elseif(isInNet(ip,'10.0.0.0','255.0.0.0'))return'DIRECT';elseif(isInNet(ip,'192.168.0.0','255.255.0.0'))return'DIRECT';elseif(isInNet(ip,'172.16.0.0','255.240.0.0'))return'DIRECT';elseif(isInNet(ip,'169.254.0.0','255.255.0.0'
3、))return'DIRECT';//videoruleselseif(shExpMatch(url,'*.flv'))return'PROXY'+host+'.local.acc.sogou.com:8081;';elseif(shExpMatch(url,'*.mp4'))return'PROXY'+host+'.local.acc.sogou.com:8081;';elseif(shExpMatch(url,'http:*/flv/*.flv?*&key=*'))return'PROXY'+host+'.loca
4、l.acc.sogou.com:8081;';elseif(shExpMatch(url,'http:*/mp4/*.f4v?*&key=*'))return'PROXY'+host+'.local.acc.sogou.com:8081;';elseif(shExpMatch(url,'*.flv?start=*'))return'PROXY'+host+'.local.acc.sogou.com:8081;';elseif(shExpMatch(url,'*.mp4?start=*'))return'PROXY'+h
5、ost+'.local.acc.sogou.com:8081;';elseif(isInNet(ip,'58.154.0.0','255.254.0.0'))return'DIRECT';elseif(isInNet(ip,'58.192.0.0','255.254.0.0'))return'DIRECT';elseif(isInNet(ip,'58.194.0.0','255.254.0.0'))return'DIRECT';elseif(isInNet(ip,'58.196.0.0','255.254.0.0'))
6、return'DIRECT';elseif(isInNet(ip,'58.198.0.0','255.254.0.0'))return'DIRECT';elseif(isInNet(ip,'58.200.0.0','255.248.0.0'))return'DIRECT';elseif(isInNet(ip,'59.64.0.0','255.252.0.0'))return'DIRECT';elseif(isInNet(ip,'59.68.0.0','255.252.0.0'))return'DIRECT';elsei
7、f(isInNet(ip,'59.72.0.0','255.254.0.0'))return'DIRECT';elseif(isInNet(ip,'59.74.0.0','255.254.0.0'))return'DIRECT';elseif(isInNet(ip,'59.76.0.0','255.255.0.0'))return'DIRECT';elseif(isInNet(ip,'59.77.0.0','255.255.0.0'))return'DIRECT';elseif(isInNet(ip,'59.78.0.
8、0','255.254.0.0'))return'DIRECT';elseif(isInNet(ip,'110.64.0.0','255.254.0.0'))return'DIRECT';elseif(isInNet(ip,'111.114.0.0','255.254.0.0'))return'DIRECT';elseif(isI