asteroidman / wallproxy-plus

Automatically exported from code.google.com/p/wallproxy-plus
1 stars 0 forks source link

iplist怎么设置? #293

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
iplist怎么设置?

Original issue reported on code.google.com by shichunj...@gmail.com on 2 Nov 2012 at 5:16

GoogleCodeExporter commented 9 years ago
以国内ip直连,国外ip走GAE为例:
1. 转换格式:
>>> from urllib2 import urlopen
>>> data = 
urlopen('http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest').read()
>>> from re import findall
>>> chinaip = findall(r'(?i)\|cn\|ipv4\|(\d+\.\d+\.\d+\.\d+\|\d+)', data)
>>> with open('china-iplist.txt', 'wb') as fp:
...   fp.write('\n'.join(chinaip))
...
将china-iplist.txt放到local\misc文件夹下。
2. 
修改proxy.ini,因为匹配规则的不走代理,与autoproxy列表相反��
�所以要使用复杂设置方式https://code.google.com/p/wallproxy-plus/issue
s/detail?id=221#c10 :
[pac]
enable = 1
;file = proxy.pac
https_mode = 2
rulelist = 
iplist = !iplist
default = PROXY *:8087; DIRECT
py_default = GAE

[iplist]
DIRECT = china-iplist.txt

[py_iplist]
DIRECT = china-iplist.txt
老规矩,file是否设置决定是智能代理模式还是PAC模式。

Original comment by www.eh...@gmail.com on 2 Nov 2012 at 5:49

GoogleCodeExporter commented 9 years ago
有点复杂,理解不了!不过还是感谢!

Original comment by shichunj...@gmail.com on 3 Nov 2012 at 3:51

GoogleCodeExporter commented 9 years ago

Original comment by www.eh...@gmail.com on 6 Nov 2012 at 1:51

GoogleCodeExporter commented 9 years ago
Moved to: Issue wallproxy:347

Original comment by heeroyuyj on 2 Dec 2012 at 4:37