Last active
August 29, 2015 14:02
-
-
Save imzjy/7efd91db8f10024c144b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 PROXY = "SOCKS5 localhost:1080"; | |
var blocked = ["google.com", | |
"archive.org", | |
"youtube.com", | |
"facebook.com", | |
"blogspot.com", | |
"wordpress.com", | |
"amazonaws.com", | |
"github.com", | |
"gmail.com", | |
"google.com.hk", | |
"google.com.sg", | |
"googleusercontent.com", | |
"googlecode.com", | |
"googleapis.com", | |
"googleadservices.com", | |
"greatfirewallofchina.org", | |
"google-analytics.com", | |
"whatblocked.com", | |
"slideshare.net", | |
"evernote.com", | |
"linkedin.com", | |
"shadowsocks.org", | |
"t.co", | |
"ow.ly", | |
"angularjs.org", | |
"ytimg.com", | |
"chrome.com", | |
"youtu.be", | |
"twitter.com"]; | |
for(var i=0; i<blocked.length; i++){ | |
if (dnsDomainIs(host, blocked[i])) { | |
return PROXY; | |
} | |
} | |
return "DIRECT"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment