amnextking / wallproxy-plus

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

关于教育网Bras #289

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
我们学校上网用Bras的有两种,一个可以连所有网(@b服务)��
�有一个只能访问Cernet免费IP地址范围(@a服务)。但是@a可以�
��wallproxy代理。
所以我想能不能实现范围内网址直接访问、其他网址走代理��
�

Cernet免费IP地址范围查询地址是 
http://www.nic.edu.cn/RS/ipstat/internalip/

因为好像上面那个网址不一定能访问,所以再附一下提供的��
�表形式(附件):

Original issue reported on code.google.com by haozih...@gmail.com on 2 Nov 2012 at 3:51

Attachments:

GoogleCodeExporter commented 9 years ago
v2.0.15版,新增[pac]iplist参数,设置方法与rulelist相同:
https://code.google.com/p/wallproxy-plus/issues/detail?id=221#c10
支持的列表格式是ip
x.x.x.x/m: 子网为x.x.x.x掩码为m的ip范围
x.x.x.x|n: 从x.x.x.x起始的n个ip
所以你首先应该将列表转换为wp支持的格式并保存到misc文件��
�下,然后将文件名设置到proxy.ini中:
1.51.0.0/16
1.157.0.0/15
……

Original comment by www.eh...@gmail.com on 2 Nov 2012 at 4:18

GoogleCodeExporter commented 9 years ago
刚刚弄了一下,然后试着访问了项目主页,发现可以走代理��
�,而且访问校园网也是直接连接的,本以为搞定了,但是又�
��便访问了一个网结果又不行了……网址是bangumi.tv

proxy.ini设置是:

[pac]
enable = 1
file = proxy.pac
https_mode = 2
rulelist = 
iplist = !iplist
default = PROXY *:8087; DIRECT
py_default = GAE

[iplist]
DIRECT=Cernet-iplist.txt

[py_iplist]
DIRECT=Cernet-iplist.txt

用的是Chrome内核浏览器IE PAC:http://127.0.0.1:8087/proxy.pac

Original comment by haozih...@gmail.com on 5 Nov 2012 at 1:40

Attachments:

GoogleCodeExporter commented 9 years ago
你们学校不支持 IPv6 么?

貌似要
default = PROXY *:8087; DIRECT|DIRECT|DIRECT
py_default = GAE|DIRECT|DIRECT

不懂啥意思,等作者

Original comment by rpzrpz...@gmail.com on 5 Nov 2012 at 1:43

GoogleCodeExporter commented 9 years ago
在工作室ipv6只有无线的,速度实在蛋疼。这里面说到的bras可
以有线连,速度比较有保障

Original comment by haozih...@gmail.com on 5 Nov 2012 at 2:03

GoogleCodeExporter commented 9 years ago
顺便说一下#c2里写的那些设置是参考 Issue 293的

Original comment by haozih...@gmail.com on 5 Nov 2012 at 2:04

GoogleCodeExporter commented 9 years ago
哦,我是看的 [Issue 301]

Original comment by rpzrpz...@gmail.com on 5 Nov 2012 at 2:23

GoogleCodeExporter commented 9 years ago
@rpzrpz123:真不想说第二遍,自己看[Issue301#c2]
@haozihong:贴pac和你那里解析的域名吧

Original comment by www.eh...@gmail.com on 5 Nov 2012 at 3:11

GoogleCodeExporter commented 9 years ago

Original comment by haozih...@gmail.com on 5 Nov 2012 at 3:41

Attachments:

GoogleCodeExporter commented 9 years ago
…………啊不,等一下,我重新开了一下,proxy.pac更新了,��
�现iplist了。
刚刚明明是重启过wallproxy的啊……我再试试

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

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
好了!看来是搞定了……
另外问一下啊,那个file=proxy.pac加了分号注释掉之后,每次运
行wallproxy好像还是会更新啊。加不加分号proxy.pac会不一样吗��
�

Original comment by haozih...@gmail.com on 5 Nov 2012 at 3:53

GoogleCodeExporter commented 9 years ago
加分号是智能代理,不加分号是PAC,智能代理不更新PAC;
GUI的“代理设置”中有个“自动更新”的文件形式的“PAC”��
�即使是智能代理模式,也能通过GUI更新PAC,但是这个地方开�
��运行有Bug,所以在刚才的2.0.18版GUI中改为了不自动更新的url
形式的PAC。

Original comment by www.eh...@gmail.com on 5 Nov 2012 at 3:57

GoogleCodeExporter commented 9 years ago
BTW,如果你需要通过GUI更新PAC,需要按照https://code.google.com/p/
wallproxy-plus/issues/detail?id=221#c10 类似的修改local\pac

Original comment by www.eh...@gmail.com on 5 Nov 2012 at 4:00

GoogleCodeExporter commented 9 years ago
就是说就算注释掉file=proxy.pac,但如果用浏览器中设置用\local
\misc\proxy.pac还是一样的?

另外想请教一下……那个proxy.ini中
[pac]
default = PROXY *:8087; DIRECT
py_default = GAE
是什么意思?
[rulelists]
DIRECT =  https://my-ap-lists.googlecode.com/svn/branches...
PROXY *:8088; DIRECT = https://my-ap-lists.googlecode.com/svn/branches/fff
又都是什么??

#c3里提到的设置是什么?要那样设置吗??

Original comment by haozih...@gmail.com on 5 Nov 2012 at 5:24

GoogleCodeExporter commented 9 years ago
老大,我的意思是:
[pac]default=default_target|ipv6_target|failed_target
但failed怎么对应direct 呢?不是应该对应gae么?

Original comment by rpzrpz...@gmail.com on 6 Nov 2012 at 12:58

GoogleCodeExporter commented 9 years ago
动脑想想行么?
流程:
如果匹配代理1的URL规则,走代理1,如果匹配代理2的URL规则��
�走代理2,……;
解析IP,如果解析失败,走default[2],如果是IPv6地址,走default
[1];
如果ip匹配代理3的IP规则,走代理3,如果匹配代理4的IP规则��
�走代理4,……;
走default[0]。
至于解析失败或IPv6或默认是DIRECT还是GAE,都是可设置的,你�
��得解析失败走GAE更合理就走GAE呗。
PS: 
你问的问题也不少了,很少见你帮忙回答过其他人问的类似��
�题。

Original comment by www.eh...@gmail.com on 6 Nov 2012 at 4:48

GoogleCodeExporter commented 9 years ago
看 FAQ 10 貌似是本校的一位师兄……
那个文档貌似经常改。

文科生貌似真的理解不了~
[pac]
default = PROXY *:8087; DIRECT|DIRECT|GAE
py_default = GAE|DIRECT|GAE

然后应该还要写下ipv6的iplist列表吧?格式如何呢?
[rulelists]
DIRECT =  https://my-ap-lists.googlecode.com/svn/ipv6ip
[py_rulelists]
DIRECT =  https://my-ap-lists.googlecode.com/svn/ipv6ip

支持的列表格式是ip,下面这个如何转换成ipv6?
x.x.x.x/m: 子网为x.x.x.x掩码为m的ip范围
x.x.x.x|n: 从x.x.x.x起始的n个ip

ps.去问问是不是就是那位师兄……

Original comment by cuplkej...@gmail.com on 6 Nov 2012 at 5:48

GoogleCodeExporter commented 9 years ago
老大,我问的问题呢……

Original comment by haozih...@gmail.com on 6 Nov 2012 at 6:35

GoogleCodeExporter commented 9 years ago
这不是之前某位建的课件公邮么,咋跑这来了……
不过问的都是我不懂的啊!
好吧,理解力太差了丷丷

ps.顺利的话明年会有大把的时间的~

Original comment by rpzrpz...@gmail.com on 6 Nov 2012 at 7:31

GoogleCodeExporter commented 9 years ago
;default的DIRECT与py_default的DIRECT不是一个意思
;见https://code.google.com/p/wallproxy-plus/issues/detail?id=221#c10
default = PROXY *:8087; DIRECT|DIRECT|PROXY *:8087; DIRECT
py_default = GAE|DIRECT|GAE

都发现是ipv6地址了,还匹配个啥,直接走DIRECT呗

自己转,脚本转手工转随意

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

GoogleCodeExporter commented 9 years ago
还是不咋明白,这样下面这个还需要不?
[iplists]
DIRECT = Cernet-iplist.txt
[py_iplist]
DIRECT = Cernet-iplist.txt

还有,2.1.0 找不到config.py了?

Original comment by cuplkej...@gmail.com on 6 Nov 2012 at 2:11

GoogleCodeExporter commented 9 years ago
附上proxy.ini
还是不成功。
麻烦了!

Original comment by cuplkej...@gmail.com on 6 Nov 2012 at 2:12

Attachments:

GoogleCodeExporter commented 9 years ago
将proxy.ini设置为PAC模式(即取消对[pac]file的注释)并运行,��
�便生成config.py;
访问http://127.0.0.1:8086/#config_py 
找到rulelist到PacFile之间的内容并复制;
富文本编辑器打开local\pac(没合适编辑器的话也可以将pac重��
�名为config.py再访问WEB“配置文件(py)”);
找到rulelist到PacFile之间的内容并用之前复制的内容替换,选��
�这部分代码,按一次Tab键调整缩进;
保存(如果是重命名的话再将config.py改回pac)

Original comment by www.eh...@gmail.com on 6 Nov 2012 at 2:36

GoogleCodeExporter commented 9 years ago
这个明白了。
不过很不好意思,最不懂的还是下面这个是否需要?
[iplists]
DIRECT = Cernet-iplist.txt
[py_iplist]
DIRECT = Cernet-iplist.txt

如果需要的话,如何写?
ipv6要全部包含进去真不知道如何办。
还是说不需要了,下面这两句就已经起到了判断ipv6时直连的�
��用?那是否需要#iplist?
default = PROXY *:8087; DIRECT|DIRECT|PROXY *:8087; DIRECT
py_default = GAE|DIRECT|GAE

真的麻烦了,不过的确是看不懂啊。

Original comment by cuplkej...@gmail.com on 6 Nov 2012 at 2:46

GoogleCodeExporter commented 9 years ago
你的proxy.ini没问题。
需要,因为解析ip比较耗时,所以没有iplists的话根本就不会��
�解析ip,也就无从判断是否IPv6,如果你真的只需要解析ip,��
�以弄个文件判断是否本地或局域网ip:
127.0.0.0/8 10.0.0.0/8 192.168.0.0/16 172.16.0.0/14 169.254.0.0/16

Original comment by www.eh...@gmail.com on 6 Nov 2012 at 2:59

GoogleCodeExporter commented 9 years ago
问题在于ipv6的iplist如何判断呢?
比方说现在code.google.com 用的是2404:6800:8005::66 
完全不知道这个如何写成类似
x.x.x.x/n 的模式 

Original comment by cuplkej...@gmail.com on 7 Nov 2012 at 1:51

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

Original comment by wwqgtxx on 1 Dec 2012 at 2:45