Debian 上代理软件推荐

111 views
Skip to first unread message

Ming Lee

unread,
May 10, 2013, 11:17:54 AM5/10/13
to sh...@googlegroups.com
我想在Debian上对goagent实现代理,意思就是想让所有的请求全都走goagent,
在浏览器里有switchyproxy,等各种代理软件,在linux下有没有其他的软件实现
这个功能,网上找了下,没有找到,有简单易用的给推荐下呗。

jack

unread,
May 10, 2013, 11:18:38 AM5/10/13
to sh...@googlegroups.com
proxychains


--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/groups/opt_out。
 
 

依云

unread,
May 10, 2013, 11:22:39 AM5/10/13
to sh...@googlegroups.com
redsocks 配合 iptables。Android 上就是用的这种方案。

--
Best regards,
lilydjwg

Linux Vim Python 我的博客:
http://lilydjwg.is-programmer.com/
--
A: Because it obfuscates the reading.
Q: Why is top posting so bad?

Ming Lee

unread,
May 10, 2013, 11:24:52 AM5/10/13
to sh...@googlegroups.com
我要在linux上实现,不用在android上弄


2013/5/10 依云 <lily...@gmail.com>

Ming Lee

unread,
May 10, 2013, 11:33:46 AM5/10/13
to sh...@googlegroups.com
看了下网上的用法怎么打开一个浏览器比如firefox还要 proxychains firefox呢,
这是什么个情况,如果我想执行一个python文件,也要proxychains python file.py吗?


2013/5/10 Ming Lee <clou...@gmail.com>

依云

unread,
May 10, 2013, 12:16:39 PM5/10/13
to sh...@googlegroups.com
On Fri, May 10, 2013 at 11:24:52PM +0800, Ming Lee wrote:
> 我要在linux上实现,不用在android上弄

原理是一样的嘛。你的 Linux 上安装不了 redsocks 了?你的 Linux 不支持
iptables?

proxychains 是对指定程序使用 TCP 级代理。goagent 是不支持 HTTP-CONNECT
的 HTTP 代理,所以用不到一起去。

Ming Lee

unread,
May 11, 2013, 1:10:40 AM5/11/13
to sh...@googlegroups.com
这样的啊,怪不得proxychains昨晚试就是不行,我用red socks 试试


Ming Lee

unread,
May 11, 2013, 2:26:55 AM5/11/13
to sh...@googlegroups.com
应该 怎么用red socks + iptables + goagent 配置代理呀?根据下面这个试了下,不行,请高手指点
这篇文章里的程序都是自己编译的,我直接用apt-get 安装的,顺序跟他的不一样,但是不行,有成功配置好的吗?


2013/5/11 Ming Lee <clou...@gmail.com>

依云

unread,
May 11, 2013, 5:57:19 AM5/11/13
to sh...@googlegroups.com
On Sat, May 11, 2013 at 02:26:55PM +0800, Ming Lee wrote:
> 应该 怎么用red socks + iptables + goagent 配置代理呀?根据下面这个试了下,不行,请高手指点
> http://pritambaral.com/2012/04/transparent-proxy-on-linux/
> 这篇文章里的程序都是自己编译的,我直接用apt-get 安装的,顺序跟他的不一样,但是不行,有成功配置好的吗?

两步。

第一步,配置好 redsocks。参见你能找到的配置示例。HTTP 部分用 http-relay。
GoAgent 不支持 HTTP-CONNECT 所以 HTTPS 我也没想到要怎么做。配置完启动之。

第二步,配置 iptables。首先记住 GoAgent 使用的 IP 段不要转发了。这个 IP
段在 GoAgent 使用时的输出中好像有。没有直接拿 lsof 或者 strace 看它连的
是哪里。
iptables -t nat -I OUTPUT -d IP段 --dport=80 -j RETURN
然后转发 80 端口的请求:
iptables -t nat -A OUTPUT --dport=80 -j REDIRECT --to-port redsocks的端口

如果 DNS 被污染的话还得另想办法,比如使用 TCP 或者加密:
http://lilydjwg.is-programmer.com/2012/11/10/dnscrypt-dnsmasq.36288.html
Reply all
Reply to author
Forward
0 new messages