server如何获取到目的地址?
cmq2525 opened this issue · comments
local部分直接将收到的包加密转发给server,但是server却能够从和local的连接中获取到诸如目的地址等一系列信息:
The SOCKS request is formed as follows:
+----+-----+-------+------+----------+----------+
|VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT |
+----+-----+-------+------+----------+----------+
| 1 | 1 | X'00' | 1 | Variable | 2 |
+----+-----+-------+------+----------+----------+
请问这些信息是在什么时候写入的?
client 端什么时候写入?不需要,client 只需要监听个端口 copy send 就好。比如你用 curl,设置好代理配置,curl 就会用 s5 协议,通过 client 与 server 交换数据。写入这些信息的就是 curl 了