Created
March 27, 2013 06:21
-
-
Save zolunx10/5252132 to your computer and use it in GitHub Desktop.
messy configure files
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) { | |
// ZJU | |
if ( | |
dnsDomainIs(host, ".zju.edu.cn") | |
|| isInNet(host, "10.0.0.0", "255.0.0.0") | |
|| isInNet(host, "210.32.0.0", "255.255.240.0") | |
|| isInNet(host, "210.32.128.0", "255.255.192.0") | |
) { | |
return "DIRECT"; | |
} | |
// Predefined rules, You could modify them by yourself. | |
if ( | |
shExpMatch(url, "*://*.google.com/*") | |
|| shExpMatch(url, "*://*.google.com.*/*") | |
|| shExpMatch(url, "*://*.google-analytics.com/*") | |
|| shExpMatch(url, "*://*.googleapis.com/*") | |
|| shExpMatch(url, "*://*.googlecode.com/*") | |
|| shExpMatch(url, "*://*.googleusercontent.com/*") | |
|| shExpMatch(url, "*://*.gstatic.com/*") | |
|| shExpMatch(url, "*://*.wikipedia.org/*") | |
|| shExpMatch(url, "*://*.twimg.com/*") | |
|| shExpMatch(url, "*://*.ytimg.com/*") | |
|| shExpMatch(url, "*://t.co/*") | |
|| shExpMatch(url, "*://bit.ly/*") | |
|| shExpMatch(url, "*://goo.gl/*") | |
|| shExpMatch(url, "*://fb.me/*") | |
|| shExpMatch(url, "*://wp.me/*") | |
|| shExpMatch(url, "*://j.mp/*") | |
|| shExpMatch(url, "*://ow.ly/*") | |
|| shExpMatch(url, "*://po.st/*") | |
|| shExpMatch(url, "*://bbc.in/*") | |
) | |
{ | |
return 'PROXY 127.0.0.1:8087'; | |
} | |
return FindProxyForURLByAutoProxy(url, host); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment