1 //=============================================
2 // PROXY WHITELIST FOR CHINESE WEBSITE
3 //---------------------------------------------
4 // Maintained by Tunghsiao Liu (sparanoid.com)
5 //---------------------------------------------
6 // Add this .pac file to your system proxy
7 // settings under internet configuration. You
8 // may also need to change your DNS.
9 // If you have problem with local pac on Lion,
10 // try to fire up a localhost like this:
11 // http://localhost:8888/cnwhitelist/cnwhitelist.pac
12 //=============================================
17 // Change your proxy here. Just FYI You can add
18 // multiple failback proxies.
19 //---------------------------------------------
20 var proxy = "SOCKS5 127.0.0.1:3333; SOCKS 127.0.0.1:3333; DIRECT";
22 function FindProxyForURL(url, host) {
24 // Bypass Local Networks
25 if (isPlainHostName(host)) {
30 var resolved_ip = dnsResolve(host);
32 if (isInNet(resolved_ip, "10.0.0.0", "255.0.0.0") ||
33 isInNet(resolved_ip, "172.16.0.0", "255.240.0.0") ||
34 isInNet(resolved_ip, "192.168.0.0", "255.255.0.0") ||
35 isInNet(resolved_ip, "127.0.0.0", "255.255.255.0")) {
41 // Have to use proxy or it dosen"t work.
42 //---------------------------------------------
46 // Assume all .cn domains use Chienses servers.
47 // So no need to re-add specified domains.
48 //---------------------------------------------
51 // Web Portals / News / Emails
52 //---------------------------------------------
57 "*://*.netease.com/*",
80 "*://staticsdo.com/*",
81 "*://*.staticsdo.com/*",
84 //---------------------------------------------
89 //---------------------------------------------
99 "*://cidianwang.com/*",
100 "*://*.cidianwang.com/*",
103 //---------------------------------------------
105 "*://*.renren.com/*",
108 "*://*.douban.com/*",
116 "*://weiphone.com/*",
117 "*://*.weiphone.com/*",
120 "*://*.pcbeta.com/*",
129 //---------------------------------------------
131 "*://*.taobao.com/*",
133 "*://taobaocdn.com/*",
134 "*://*.taobaocdn.com/*",
137 "*://*.atpanel.com/*",
143 "*://*.alipay.com/*",
146 "*://*.alibaba.com/*",
149 "*://*.aliimg.com/*",
152 "*://*.360buy.com/*",
154 "*://360buyimg.com/*",
155 "*://*.360buyimg.com/*",
158 "*://*.eachnet.com/*",
163 "*://yihaodian.com/*",
164 "*://*.yihaodian.com/*",
166 "*://yihaodianimg.com",
167 "*://*.yihaodianimg.com",
173 "*://*.vanclimg.com",
176 //---------------------------------------------
177 "*://cmbchina.com/*",
178 "*://*.cmbchina.com/*",
180 "*://bankofchina.com/*",
181 "*://*.bankofchina.com/*",
186 // Telecommunications
187 //---------------------------------------------
192 "*://*.ct10000.com/*",
195 //---------------------------------------------
196 "*://sf-express.com/*",
197 "*://*.sf-express.com/*",
200 //---------------------------------------------
205 "*://*.mukkyu.com/*",
208 "*://*.jsharer.com/*",
214 "*://*.030buy.com/*",
216 "*://saraba1st.com/*",
217 "*://*.saraba1st.com/*",
223 //---------------------------------------------
225 "*://*.feidee.com/*",
227 // Webmaster / Counter
228 //---------------------------------------------
235 "*://google-analytics.com/*",
236 "*://*.google-analytics.com/*",
238 "*://jiankongbao.com/*",
239 "*://*.jiankongbao.com/*",
242 "*://*.frantech.ca/*",
245 //---------------------------------------------
247 "*://clients.google.com/*",
248 "*://*.clients.google.com/*",
250 // Powered by Tunghsiao Liu
251 //---------------------------------------------
258 "*://sparanoid.com/*",
259 "*://*.sparanoid.com/*"
262 for (var n=0; n < whitelist.length; n++) {
263 if (shExpMatch(url, whitelist[n])) {
271 // China is dangerous, Lets" go to Mars.