SOCKS5 绑定是持久的还是一次性的?

发布于 2024-12-01 02:39:52 字数 436 浏览 8 评论 0原文

我一直在研究 RFC 1928 并且 BIND 操作的描述不清楚大部头书。据我了解,设置顺序描述如下:

  1. 客户端与 SOCKS5 服务器建立连接
  2. 客户端执行 CONNECT 请求
  3. 客户端与 SOCKS5 服务器建立新的 TCP 连接并请求 BIND
  4. 服务器立即回复 BIND 结果操作
  5. 收到传入连接后,SOCKS5 服务器会向客户端发送通知。

我不太清楚步骤 5。之后我是否必须重新请求 BIND 以允许更多传入连接?

据我了解,相同的 TCP 连接(在步骤 3 中建立)用于与接受的对等方进行通信。如果我需要继续接受同一地址:端口上的连接怎么办?毕竟这可能吗?

I've been studying RFC 1928 and the description of the BIND operation wasn't clear to me. The setup sequence is described as follows, as I understand it:

  1. The client establishes connection to the SOCKS5 server
  2. The client performs the CONNECT request
  3. The client establishes new TCP connection to the SOCKS5 server and requests BIND
  4. The server replies immediately with the result of the BIND operation
  5. Upon receiving incoming connection, the SOCKS5 server sends the notification to the client

What is not immediately clear for me is the step 5. Do I have to re-request BIND afterwards to allow for more incoming connections?

As far as I understand, the same TCP connection (established at the step 3) is used for communication with the accepted peer. What if I need to keep accepting connections on the same address:port? Is it possible, after all?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝颜夕 2024-12-08 02:39:52

对于要接受的每个连接,您需要一个单独的 BIND 请求,因为当客户端连接到绑定端口时,SOCKS 代理仅发回 1 个通知。 SOCKS5 代理是否允许同一 IP/端口上的多个 BIND 请求取决于代理的实现。

You need a separate BIND request for each connection you want to accept, as there is only 1 notification sent back by the SOCKS proxy when a client connects to the bound port. Whether or not the SOCKS5 proxy allows multiple BIND requests on the same IP/Port depends on the proxy's implementation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文