Created
July 4, 2009 02:34
-
-
Save kylexlau/140406 to your computer and use it in GitHub Desktop.
auto proxy javascript codes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FindProxyForURL(url, host) | |
{ | |
var domain_list = [ | |
// "wikipedia.org", | |
"blogspot.com", | |
"wordpress.com", | |
"flickr.com", | |
"feedburner.com", | |
"v2ex.com", | |
"vox.com" | |
]; | |
for (var i = domain_list.length - 1; i >= 0; i--){ | |
if (dnsDomainIs(host,domain_list[i])) {return "PROXY 127.0.0.1:8118"} | |
}; | |
return "DIRECT" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment