asteroidman / wallproxy-plus

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

寻求配置文件写法帮助 #386

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
目前仍然坚持在wallproxy 1.0.x 
上,想切换到wallproxy-plus,但是对如何达到下面的目的不会写
配置文件。

1, userlist.ini 列明需要通过GAE的网站(GAE服务端为goagent1.x)。
2, phplist.ini 列明需要通过PHP的网站(PHP服务端为goagent 
1.10.0)。
3, cncctc.ini 列明需要通过Sina 
APP托管的PHP(解决部分网站南北互通问题,PHP服务端为goagent 
1.10.0)。
4, 其他网站一律直接连接即可。

三个域名列表没有重复项。求根据这个要求写的wallproxy-plus配
置文件。多谢!

Original issue reported on code.google.com by qgt...@gmail.com on 13 Nov 2012 at 12:49

GoogleCodeExporter commented 9 years ago
除非在生成config.py后再稍加修改,否则做不到proxy.pac走不同��
�PAAS服务端,但是智能代理可以。
[pac]
rulelist = !rulelist

[rulelist]
PROXY *:8087:DIRECT = userlist.ini
PROXY *:8088:DIRECT = phplist.ini

[py_rulelist]
GAE = userlist.ini
PAAS1 = phplist.ini
PAAS2 = cncctc.ini

[paas]
fetchserver = phpserverurl|sinaserverurl

Original comment by www.eh...@gmail.com on 13 Nov 2012 at 1:06

GoogleCodeExporter commented 9 years ago
PAAS1 = phplist.ini
PAAS2 = cncctc.ini
这两句不会执行,两个ini文件不会被读取。如果只有PAAS = 
phplist.ini就没问题

Original comment by qgt...@gmail.com on 15 Nov 2012 at 2:49

GoogleCodeExporter commented 9 years ago
    GAE = paas.GAE(appids=['appids'], listen='8087', path='/fetch.py', scheme='https', hosts=google_hosts, maxsize=500000, waitsize=100000, max_threads=3, fetch_mode=1)
    PAAS1 = paas.PAAS(url='http://www.mydomain.com/goagent/index.php', listen='8088', proxy='http://127.0.0.1:8086')
    PAAS2 = paas.PAAS(url='http://1.saeurl.sinaapp.com/fetch.php', listen='8088', proxy='')

    rulelist = (
        (RuleList(['gaelist.ini']), GAE),
        (RuleList(['phplist.ini']), PAAS1),
        (RuleList(['cncctc.ini']), PAAS2),
    )
修改config.py如上,终于达到了我的要求,正在试用中。

Original comment by qgt...@gmail.com on 15 Nov 2012 at 5:37

GoogleCodeExporter commented 9 years ago
PAAS1/PAAS2 list无效是bug,v2.1.4版已修复。
另外,如果你修改config.py的话,是可以做到生成的pac也不同��
�paas对应不同的list的:
    PAAS1 = paas.PAAS(url='http://demo1.app.com/', listen='9001', password='123456')
    PAAS2 = paas.PAAS(url='http://demo2.app.com/', listen='9002', password='123456')
    PAASS = (PAAS1, PAAS2)
    from random import choice
    PAAS = lambda req: choice(PAASS)(req)
    rulelist = (
        (['gaelist.ini'], 'PROXY *:8087;DIRECT'),
        (['paas1list.ini'], 'PROXY *:9001;DIRECT'),
        (['paas2list.ini'], 'PROXY *:9002;DIRECT'),
    )

Original comment by www.eh...@gmail.com on 15 Nov 2012 at 12:48

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

Original comment by heeroyuyj on 2 Dec 2012 at 5:01