如何编写tcp代理?

问题描述:

我对 tcp 代理实现很好奇.

你能给我一些关于如何理解和开发一个简单版本的提示吗?

Can you give me some tips about how to understand and develop a naive version?

是否有关于它的好的材料(或开放项目)教程?=)

And is there any good materials(or open projects) or tutorial on it? =)

构建一个运行良好的代理并不是一项简单的任务,因为您必须在两个方向上理解和处理多个协议等...

Building a well working proxy is no simple task as you will have to understand and handle several protocols etc. in both directions...

我建议要么使用现有的库,要么使用一些可配置的代理...

I would recommend to either use an existing library for that OR some configurable proxy...

  • http://www.mentalis.org/soft/projects/proxy/ (with source)
  • http://fusion.corsis.eu/ (with source)
  • http://www.wingate.com/
  • http://www.squid-cache.org/