自由上网
8 years ago
committed by
GitHub
1 changed files with 0 additions and 25 deletions
@ -1,25 +0,0 @@ |
|||||
var proxy = "HTTP 47.88.223.209:25; DIRECT"; |
|
||||
|
|
||||
var domains = { |
|
||||
"localhost": 1 |
|
||||
}; |
|
||||
|
|
||||
var direct = 'DIRECT;'; |
|
||||
|
|
||||
var hasOwnProperty = Object.hasOwnProperty; |
|
||||
|
|
||||
function FindProxyForURL(url, host) { |
|
||||
var suffix; |
|
||||
var pos = host.lastIndexOf('.'); |
|
||||
while(1) { |
|
||||
suffix = host.substring(pos + 1); |
|
||||
if (hasOwnProperty.call(domains, suffix)) { |
|
||||
return proxy; |
|
||||
} |
|
||||
if (pos <= 0) { |
|
||||
break; |
|
||||
} |
|
||||
pos = host.lastIndexOf('.', pos - 1); |
|
||||
} |
|
||||
return proxy; |
|
||||
} |
|
Loading…
Reference in new issue