公司服务器只有一台访问外网,需要把对外网的一些tcp请求,转发到这台机器上,通过这台机器的代理程序转发到外网IP.
收集了一下tcp代理:
1.通过windows 带的功能:
netsh interface portproxy add v4tov4 listenport=80 connectaddress=ip-of-server-on-internet connectport=23 listenaddress=ip-of-windows-machine protocol=tcp
2, C++ TCP Proxy Server
http://www.partow.net/programming/tcpproxy/index.html
有源码异步IO.实用的库:
http://think-async.com/Asio
https://github.com/chriskohlhoff/asio/
http://think-async.com/Asio/asio-1.11.0/doc/asio/tutorial.html
3.纯linux c 实现代理,放在openwrt 中使用.
https://github.com/kklis/proxy
4.libevent带的案例.window编译需要注意,实用openssl的lib库.
\libevent-2.0.22-stable\sample\le-proxy.c
5.windows 窗口消息实现的tcp代理程序.
http://dposey.no-ip.com/Proxy/