Total Pageviews

Monday 7 March 2016

GFW Domain White List



GFW White List

This PAC file use white list, which contains website can directly access. If some domain are not included, it will access through proxy.
If you use this PAC file, you may need a proxy which not billing with flow. 
I will write a spider that automaticly update the white list, and as you see, it is not implement yet.

For more infomation

Please go to WIKI

How to use

Download thewhitelist.pac, edit Server IP, and the type of proxy.Then change your browser's config, point towhitelist.pac.
var proxy = new Array( "SOCKS5 127.0.0.1:1080; SOCKS 127.0.0.1:1080;",
Change the type of proxy,it also can be 'HTTPS'
Make sure change both SOCKS5 and SOCKS

Use script to generate the PAC file

Excute command $python main.py.
Then whitelist.pac will updated, before you do so, you can simply add other white domain in lists/custom.py
I highly recommend you issues or pull requset your custom.py to me!

Load-Balance

You can change okToLoadBalance value to true to use the load balance feature, when you edit whitelist.pac you will found three proxy config in there. Only first config will become effective if you leave okToLoadBalance maintain false, but if you want to use load balance, you need edit all proxy row as well.
"SOCKS5 127.0.0.1:1083; SOCKS 127.0.0.1:1083;",
Different port or ip, and do not lose the comma!
As you see, proxy is an array, you can add most ten proxys to load balance! But three is good enough.
There is one more thing you should know, load balance is domain-based load balance, so it would not accelorate video or download something. Also notice: do not use this feature if your proxys not speed same.

PAC performance (100,000 repeat)

Firefox  
whitelist.pac 80ms 
load balabce: whitelist.pac 90ms

Chrome  
whitelist.pac 120ms
load balabce: whitelist.pac 170ms

Safari  
whitelist.pac 80ms  
load balabce: whitelist.pac 84ms  

Based on 

from https://github.com/R0uter/gfw_domain_whitelist