Issue 864 in wallproxy: Tomato路由器实现零配置的问题(443端口)

14 views
Skip to first unread message

wall...@googlecode.com

unread,
Mar 26, 2013, 4:05:51 AM3/26/13
to wallpro...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 864 by hlj49359...@gmail.com: Tomato路由器实现零配置的问题(443端口
)
http://code.google.com/p/wallproxy/issues/detail?id=864

在路由器上安装WP后用Tomato的防火墙脚本:
iptables -t nat -I PREROUTING -i br0 -m iprange --src-range
192.168.0.2-192.168.0.255 -p tcp --dport 80 -j REDIRECT --to-port 8086可实现
内网零配置,但是对https连接无效,我试着用:
iptables -t nat -I PREROUTING -i br0 -m iprange --src-range
192.168.0.2-192.168.0.255 -p tcp --dport 443 -j REDIRECT --to-port 8086
结果全部的https都打不开了,在 Issue 856中,有人说用redsocks可以,但是我没找到
Tomato能用的,尝试自己变编译也各种失败,谁能想个法子啊?或者帮我编译一个
redsocks或者给个编译教程,拜托!

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

wall...@googlecode.com

unread,
Mar 26, 2013, 7:45:22 AM3/26/13
to wallpro...@googlegroups.com

Comment #1 on issue 864 by hkbase: Tomato路由器实现零配置的问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

我用balance进行测试443端口的零配置,WP会出错,控制台输出日志信息:
192.168.5.1 - [2013-03-26 19:35:36] WP Bad
http: "\x16\x03\x01\x00\x85\x01\x00\x00\x81\x03\x01QQ\x87\xffh\xfb\xc76\x05I\xcce\x17\x10B\x8a\xc5\x1f\x80\x10\xaf\x8c\x0e-\xf0r\x86\x9e\xd5\xae\xd1$\x00\x00\x18\x00/\x005"

balance也是应用在基于TCP的端口转发,效果应该是和redsocks一样的~

wall...@googlecode.com

unread,
Mar 26, 2013, 8:12:36 AM3/26/13
to wallpro...@googlegroups.com

Comment #2 on issue 864 by hlj49359...@gmail.com: Tomato路由器实现零配置的问
题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

balance又怎么搞呢,求指教.

wall...@googlecode.com

unread,
Mar 27, 2013, 5:39:44 AM3/27/13
to wallpro...@googlegroups.com

Comment #3 on issue 864 by yanzheng...@gmail.com: Tomato路由器实现零配置的问
题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

用 redsocks也没法通过wallproxy来实现https的另配置,用ssh可以实现。

wall...@googlecode.com

unread,
Mar 27, 2013, 6:59:38 AM3/27/13
to wallpro...@googlegroups.com

Comment #4 on issue 864 by shichunj...@gmail.com: Tomato路由器实现零配置的问
题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

网内0配置,路由器拖不起啊!以前弄过,最后还是放弃了。

wall...@googlecode.com

unread,
Mar 27, 2013, 10:36:33 AM3/27/13
to wallpro...@googlegroups.com

Comment #6 on issue 864 by hkbase: Tomato路由器实现零配置的问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

是的,同意3楼的说法 , 是WP的问题,用redsocks也是没法实现443端口的零配置~

wall...@googlecode.com

unread,
Mar 27, 2013, 10:37:33 AM3/27/13
to wallpro...@googlegroups.com

Comment #5 on issue 864 by hkbase: Tomato路由器实现零配置的问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

是的,同意3楼的说法 , 是WP的问题,用redsocks也是没法实现443端口的零配置~

wall...@googlecode.com

unread,
Mar 27, 2013, 11:38:38 AM3/27/13
to wallpro...@googlegroups.com
Updates:
Status: Started

Comment #7 on issue 864 by www.eh...@gmail.com: Tomato路由器实现零配置的问题
(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

ls的,不懂就不要乱说。
wallproxy是<代理>软件,支持http/http tunnel/socks4/socks5协议,至于这几种协
议通信的数据是什么格式的,可以看看以下资料:
http://blog.csdn.net/aican_yu/article/details/7360544
http://en.wikipedia.org/wiki/SOCKS
直接把https的数据喂给wallproxy是肯定不符合以上协议的,因为根本不可能知道你要
访问的网站,所以会提示“WP Bad http”,从提示的数据结合上面的资料也能看出不符
合任何协议。
balance从名字来看就不大靠谱,至于redsocks,是可以在https数据前面加CONNECT头
以便符合http tunnel协议的,具体怎么配置,自己去查资料或者到
https://github.com/darkk/redsocks询问。
用redsocks可以支持但不完美:
1. dns污染使得所加CONNECT头中ip/域名错误(严重);
2. 由ip反解析得到的域名不靠谱,使得伪造证书无法正常工作(如果配合原生http
tunnel/socks4/socks5代理使用就不算问题)(redsocks也许并没有这个反解析过
程,那么用ip去生成伪造证书就更不靠谱了)
解决办法:一个特殊的可配合redsocks或者wallproxy工作的dns代理。
有兴趣的人可以进一步去探索,但不要口无遮拦的乱说。

wall...@googlecode.com

unread,
Mar 27, 2013, 12:05:04 PM3/27/13
to wallpro...@googlegroups.com

Comment #8 on issue 864 by www.eh...@gmail.com: Tomato路由器实现零配置的问题
(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

看了下redsocks的代码,并没有ip反解析为域名的过程。
另外上面最后半句话请无视,总之就是希望不要在没弄懂前下结论搬弄是非。
至于上面提到的dns代理,我是没时间实现的,有兴趣的人可以试试:
说特殊,是因为要实现ip反解析出准确域名的功能,例如a.comb.com都对应ip
111.111.111.111,必须给这两个域名返回不同的ip且后面能根据ip获知是访问a.com
b.com
说配合,就在于“根据ip获知是访问a.com还是b.com”,这个过程可以做在redsocks也可
以做在wallproxy中,实现上可以是进程间通信也可以是与redsocks做到同一个进程或
者做成wallproxy的插件。

wall...@googlecode.com

unread,
Mar 27, 2013, 9:35:15 PM3/27/13
to wallpro...@googlegroups.com

Comment #9 on issue 864 by hlj49359...@gmail.com: Tomato路由器实现零配置的问
题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

现在我根本就不知道怎么弄在TT上能用的Redsocks,更别提测试了,谁能给个编译教程
啊.

wall...@googlecode.com

unread,
Mar 28, 2013, 7:07:35 AM3/28/13
to wallpro...@googlegroups.com

Comment #10 on issue 864 by yanzheng...@gmail.com: Tomato路由器实现零配置的
问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

目前我是用其他办法实现https透明的,对7楼说的很感兴趣,不受污染的dns这个好
办。 加connect头的方法不知道可否赐教。

wall...@googlecode.com

unread,
Mar 28, 2013, 7:37:40 AM3/28/13
to wallpro...@googlegroups.com

Comment #11 on issue 864 by yanzheng...@gmail.com: Tomato路由器实现零配置的
问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

刚才试了一下,加了connect以后确实可以访问,但是遇到了楼上说的另外的问题,伪
造的证书是ip生成的。会提示证书错误,ie下还可以选择忽略,chrome根本就不让访
问。
关于楼上说的那种dns代理,抱歉,开始理解错了。

wall...@googlecode.com

unread,
Mar 28, 2013, 10:01:34 AM3/28/13
to wallpro...@googlegroups.com

Comment #12 on issue 864 by hlj49359...@gmail.com: Tomato路由器实现零配置的
问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

怎么做呢,请详细说说呗,另外chrome也可以在启动的时候添加命令行忽略证书错误的.

wall...@googlecode.com

unread,
Mar 28, 2013, 11:28:15 PM3/28/13
to wallpro...@googlegroups.com

Comment #13 on issue 864 by hkbase: Tomato路由器实现零配置的问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

我是用pdnsd来实现的免除dns污染,http://members.home.nl/p.a.rombouts/pdnsd/
抛砖引玉啊~~

wall...@googlecode.com

unread,
Mar 28, 2013, 11:31:47 PM3/28/13
to wallpro...@googlegroups.com

Comment #14 on issue 864 by hkbase: Tomato路由器实现零配置的问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

我把pdnsd部署到tomato路由器里面,既能免除dns污染,还具有cache查询结果的能
力,从而为整个内网的客户提升dns的查询速度和准确度。有了这个本地dns,我都把
proxy.ini里的远程dns解析关闭了,使用效果堪称完美。

wall...@googlecode.com

unread,
Mar 29, 2013, 12:47:42 AM3/29/13
to wallpro...@googlegroups.com

Comment #15 on issue 864 by yanzheng...@gmail.com: Tomato路由器实现零配置的
问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

好吧,我也说一点,pdnsd效果是不错,我也在用。不过哪天gfw对tcp解析dns下手了的
话,也搞不成了。
我现在还使用另外一个避免dns污染的工具,dnscrypt-proxy
https://github.com/opendns/dnscrypt-proxy

https,我现在是使用ssh+redsocks来实现透明的。

wall...@googlecode.com

unread,
Mar 29, 2013, 12:52:07 AM3/29/13
to wallpro...@googlegroups.com

Comment #16 on issue 864 by yanzheng...@gmail.com: Tomato路由器实现零配置的
问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

好吧,我也说一点,pdnsd效果是不错,我也在用。不过哪天gfw对tcp解析dns下手了的
话,也搞不成了。
我现在还使用另外一个避免dns污染的工具,dnscrypt-proxy
https://github.com/opendns/dnscrypt-proxy
这个也可以安装到路由器里面

wall...@googlecode.com

unread,
Mar 29, 2013, 2:24:48 AM3/29/13
to wallpro...@googlegroups.com

Comment #17 on issue 864 by hkbase: Tomato路由器实现零配置的问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

如果GFW对TCP解析下手了,那么可以把dnscrypt-proxy放到pdnsd的前面,配合一起使
用,效果照样堪称完美

wall...@googlecode.com

unread,
Mar 29, 2013, 2:25:58 AM3/29/13
to wallpro...@googlegroups.com

Comment #18 on issue 864 by hkbase: Tomato路由器实现零配置的问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

同样,我也把dnscrypt-proxy部署进了我的tomato路由器,呵呵~

wall...@googlecode.com

unread,
Mar 29, 2013, 5:33:48 AM3/29/13
to wallpro...@googlegroups.com

Comment #19 on issue 864 by hlj49359...@gmail.com: Tomato路由器实现零配置的
问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

别老吊人胃口,详细说说方法与过程呗!

wall...@googlecode.com

unread,
Mar 29, 2013, 5:43:30 AM3/29/13
to wallpro...@googlegroups.com

Comment #20 on issue 864 by yanzheng...@gmail.com: Tomato路由器实现零配置的
问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

+hkbase
倒还没试过把dnscrypt-proxy 做pdnsd的前端,改天试试,不过dnsmasq本身也有缓存
的功能,我现在只是开启了dnsmasq的缓存。

+hlj49359
在路由器里直接实现智能翻墙,对gfw杀伤较大,尤其是可以极方便地共享给多人使
用。具体方法是不方便在这里公开的。自己多用google吧。

wall...@googlecode.com

unread,
Mar 29, 2013, 9:30:10 AM3/29/13
to wallpro...@googlegroups.com

Comment #21 on issue 864 by hkbase: Tomato路由器实现零配置的问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

@yanzhengdao dnsmasq的缓存功能太弱,缓存时间短,没有pdnsd的缓存自定义ttl时间
强大。

wall...@googlecode.com

unread,
Apr 5, 2013, 11:07:43 PM4/5/13
to wallpro...@googlegroups.com

Comment #22 on issue 864 by hkbase: Tomato路由器实现零配置的问题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

redsocks 我在tomato下面编译成功了,留下邮箱,我发给你~

wall...@googlecode.com

unread,
Apr 25, 2013, 9:15:49 AM4/25/13
to wallpro...@googlegroups.com
Updates:
Status: Done

Comment #23 on issue 864 by www.eh...@gmail.com: Tomato路由器实现零配置的问
题(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

(No comment was entered for this change.)

wall...@googlecode.com

unread,
Nov 17, 2013, 2:47:38 AM11/17/13
to wallpro...@googlegroups.com

Comment #24 on issue 864 by QQ57...@gmail.com: Tomato路由器实现零配置的问题
(443端口)
http://code.google.com/p/wallproxy/issues/detail?id=864

@hkbase
求tomato下零配置的方法。。。

wall...@googlecode.com

unread,
Aug 28, 2014, 5:55:23 AM8/28/14
to wallpro...@googlegroups.com

Comment #25 on issue 864 by qianlica...@gmail.com: Tomato路由器实现零配置的
问题(443端口)
https://code.google.com/p/wallproxy/issues/detail?id=864

@hkbase 请教 tomato 如何部署 dnscrypt-proxy
Reply all
Reply to author
Forward
0 new messages