redsocks

http://darkk.net.ru/redsocks/

redsocks – redirect any TCP connection to a SOCKS or HTTP proxy

redsocks   is   a  daemon  running  on  the  local  system,  that  will
       transparently tunnel any TCP connection via a remote SOCKS4, SOCKS5  or
       HTTP  proxy  server. It uses the system firewall's redirection facility
       to intercept TCP connections, thus the redirection is system-wide, with
       fine-grained control, and does not depend on LD_PRELOAD libraries.

 

Redsocks是一个开源的网络程序,允许你将所有TCP连接重定向到SOCKS货HTTPS代理,代码依赖开源的libevent网络库。

使用环境:Linux/iptables, OpenBSD/pf 和 FreeBSD/ipfw,在Linux/iptables下已经过很好的测试。

一些Android应用也使用了redsocks,如:ProxyDroid,sshtunnel

 

特点:

可以将任何TCP连接重定向到SOCKS4,SOCKS5,HTTPS(HTTP / CONNECT)代理服务器。

支持SOCKS5/HTTPS登录/密码身份验证。SOCKS4仅支持用户名,密码将被忽略。HTTPS,目前仅实现基本和摘要方案的支持。

通过SOCKS5代理服务器,重定向UDP数据包。注:UDP包还是通过UDP发送,所以你不能通过OpenSSH中继UDP。

针对UDP DNS查询,回复”truncated reply”

重定向任何HTTP连接到不支持透明代理的代理服务器(如老的SQUID)。

官方网站:http://darkk.net.ru/redsocks/

项目代码托管:https://github.com/darkk/redsocks

 

redsocks源码阅读

https://blog.phpgao.com/redsocks_config.html