Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server与client多路复用功能 #3

Closed
FunnyWolf opened this issue Jun 24, 2020 · 2 comments
Closed

server与client多路复用功能 #3

FunnyWolf opened this issue Jun 24, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@FunnyWolf
Copy link

使用chrome等浏览器挂上socks5代理后,通常访问一个网页会建立多个tcp链接,从netio代码看会导致server与client间建立多个tcp连接,能否加入多路复用功能,使用一个tcp连接进行控制,一个tcp连接传输数据?

@EddieIvan01
Copy link
Owner

EddieIvan01 commented Jun 24, 2020

因为现有的五种模式都是可以不成对使用的(要兼容直接与其他socket连接),所以要实现你的需求需要添加新的转发模式,而且新添加的模式必须成对使用才能完成逻辑信道的编解码

例如

./iox fwd -mux -l 1080 -r 127.0.0.1:9999
./iox proxy -mux -l 9999

这样的做法实际上是把不同的功能集成在同一个工具上,会导致臃肿和增加不必要的复杂度,我希望该工具能保持精简便携


另,在我看来唯一有必要加入multiplexing的功能是remote proxy,通过一条socket完成控制和传输,所以需要权衡的是:

Advantages:

  • 减少创建连接的损耗,提升性能
  • 减少ESTABLISHED连接数,提高隐蔽性

Disadvantages:

  • 引入第三方库可能带来不稳定
  • 二进制文件体积膨胀
  • (?) 共用一个物理连接,在流量过大时是否会影响性能

@EddieIvan01 EddieIvan01 added the enhancement New feature or request label Jun 24, 2020
@EddieIvan01
Copy link
Owner

0db18f3
v0.4在反向代理中添加TCP多路复用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants