SOCKS5 绑定是持久的还是一次性的?
我一直在研究 RFC 1928 并且 BIND 操作的描述不清楚大部头书。据我了解,设置顺序描述如下:
- 客户端与 SOCKS5 服务器建立连接
- 客户端执行 CONNECT 请求
- 客户端与 SOCKS5 服务器建立新的 TCP 连接并请求 BIND
- 服务器立即回复 BIND 结果操作
- 收到传入连接后,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:
- The client establishes connection to the SOCKS5 server
- The client performs the CONNECT request
- The client establishes new TCP connection to the SOCKS5 server and requests BIND
- The server replies immediately with the result of the BIND operation
- 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于要接受的每个连接,您需要一个单独的 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.