heiher / hev-socks5-server

A high-performance socks5 server for Unix (Linux/Android/BSD/macOS)
MIT License
185 stars 33 forks source link

Please document how to use FWRDING and UDP Associate #50

Closed Retkid closed 2 weeks ago

Retkid commented 1 month ago
  1. You've extended socks5 but never mentioned how to use it. I've been reading the code, but its very labyrinthine and confusing. But, the FWRD command type is 0x5.
  2. The server sends you an IP and Port, like the UDP Associate, but unlike UDP associate, its the port you requested in the FWRD??? E.g 127.0.0.1 12345
  3. If you try and TCP connect to that port, its closed. If you try and send a forward command as defined by socks5, over tcp on the original connection, it does nothing and responds with nothing. How am I supposed to use it?

Also, I cannot get UDP associate to work at all, and I'm unsure if this is your fault.

heiher commented 1 month ago

Extended UDP FWD is a method of forwarding UDP packets in a TCP connection. The address in the response message of this command is not used, and the forwarding is on the original TCP connection of current session. The clients compatible with this command are hev-socks5-tunnel and hev-socks5-tproxy, and they need to be configured with udp: tcp.

heiher commented 2 weeks ago

Fixed: https://github.com/heiher/hev-socks5-server/commit/d5102207235f0f344351d1f0cf6e9ee662d4de0e

Retkid commented 2 weeks ago

While I do think you might have feel you "fixed" this issue, pointing to 2 projects which also don't have your packet structure documented isn't a solution. Not everything perhaps wants to work within your ecosystem, and maybe I wanna extend it, or add support for this because I like the feature.