统计学第四版答案
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
function FindProxyForURL(url, host){
if(isPlainHostName(host)) return 'DIRECT';
if(!shExpMatch(url, 'http*')) return 'DIRECT';
var ip = dnsResolve(host);
// no dns result
if(!ip) return 'PROXY 127.0.0.1:8083;';
// ipv6
if(shExpMatch(ip, '*:*')) return 'DIRECT';
// local
else if(isInNet(ip,'127.0.0.0','255.0.0.0')) return 'DIRECT';
else if(isInNet(ip,'10.0.0.0','255.0.0.0')) return 'DIRECT';
else if(isInNet(ip,'192.168.0.0','255.255.0.0')) return 'DIRECT';
else if(isInNet(ip,'172.16.0.0','255.240.0.0')) return 'DIRECT';
else if(isInNet(ip,'169.254.0.0','255.255.0.0')) return 'DIRECT';
// video rules
else if(shExpMatch(url, '*.flv')) return 'PROXY ' + host + ':8081;';
else if(shExpMatch(url, '*.mp4')) return 'PROXY ' + host + ':8081;';
else if(shExpMatch(url, 'http:*/flv/*.flv?*&key=*')) return 'PROXY ' + host + ':8081;';
else if(shExpMatch(url, 'http:*/mp4/*.f4v?*&key=*')) return 'PROXY ' + host + ':8081;';
else if(shExpMatch(url, '*.flv?start=*')) return 'PROXY ' + host + ':8081;';
else if(shExpMatch(url, '*.mp4?start=*')) return 'PROXY ' + host + ':8081;';
else if (isInNet(ip, '58.154.0.0','255.254.0.0')) return 'DIRECT';
else if (isInNet(ip, '58.192.0.0','255.254.0.0')) return 'DIRECT';
else if (isInNet(ip, '58.194.0.0','255.254.0.0')) return 'DIRECT';
else if (isInNet(ip, '58.196.0.0','255.254.0.0')) return 'DIRECT';
else if (isInNet(ip, '58.198.0.0','255.254.0.0')) return 'DIRECT';
else if (isInNet(ip, '58.200.0.0','255.248.0.0')) return 'DIRECT';
else if (isInNet(ip, '59.64.0.0','255.252.0.0')) return 'DIRECT';
else if (isInNet(ip, '59.68.0.0','255.252.0.0')) return 'DIRECT';
else if (isInNet(ip, '59.72.0.0','255.254.0.0')) return 'DIRECT';
else if (isInNet(ip, '59.74.0.0','255.254.0.0')) return 'DIRECT';
else if (isInNet(ip, '59.76.0.0','255.255.0.0')) return 'DIRECT';
else if (isInNet(ip, '59.77.0.0','255.255.0.0')) return 'DIRECT';
else if (isInNet(ip, '59.78.0.0','255.254.0.0')) return 'DIRECT';
else if (isInNet(ip, '110.64.0.0','255.254.0.0')) return 'DIRECT';
else if (isInNet(ip, '111.114.0.0','255.254.0.0')) return 'DIRECT';
else if (isInNet(ip, '111.116.0.0','255.254.0.0')) return 'DIRECT';
else if (isInNet(ip, '111.186.0.0','255.254.0.0')) return 'DIRECT';
else if (isInNet(ip, '113.54.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '114.212.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '114.214.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '115.24.0.0','255.252.0.0')) return 'DIRECT'; else if (isInNet(ip, '115.154.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '115.156.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '115.158.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '116.13.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '116.56.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '118.202.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '118.228.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '118.230.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '120.94.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '120.95.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '121.48.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '121.52.160.0','255.255.224.0')) return 'DIRECT'; else if (isInNet(ip, '121.192.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '121.193.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '121.194.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '121.248.0.0','255.252.0.0')) return 'DIRECT'; else if (isInNet(ip, '122.204.0.0','255.252.0.0')) return 'DIRECT'; else if (isInNet(ip, '125.216.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '125.218.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '125.219.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '125.220.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '125.222.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '162.105.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '166.111.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '175.185.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '175.186.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '180.84.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '180.201.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '180.208.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '183.168.0.0','255.254.0.0')) return 'DIRECT'; else if (isInNet(ip, '183.170.0.0','255.255.0.0')) return 'DIRECT'; else if (isInNet(ip, '183.172.0.0','255.252.0.0')) return 'DIRECT'; else if (isInNet(ip, '202.4.128.0','255.255.224.0')) return 'DIRECT'; else if (isInNet(ip, '202.38.2.0','255.255.254.0')) return 'DIRECT'; else if (isInNet(ip, '202.38.64.0','255.255.224.0')) return 'DIRECT'; else if (isInNet(ip, '202.38.96.0','255.255.224.0')) return 'DIRECT'; else if (isInNet(ip, '202.38.140.0','255.255.254.0')) return 'DIRECT'; else if (isInNet(ip, '202.38.184.0','255.255.248.0')) return 'DIRECT'; else if (isInNet(ip, '202.38.192.0','255.255.192.0')) return 'DIRECT'; else if (isInNet(ip, '202.112.0.0','255.255.0.0')) return 'DIRECT';