add socks5 udp relay

This commit is contained in:
ginuerzh
2021-11-08 15:26:23 +08:00
parent 16f34d3e94
commit 10f53e18a0
12 changed files with 459 additions and 43 deletions

View File

@ -99,6 +99,7 @@ func (h *socks5Handler) Handle(ctx context.Context, conn net.Conn) {
case gosocks5.CmdUdp:
h.handleUDP(ctx, conn, req)
case socks.CmdUDPTun:
h.handleUDPTun(ctx, conn, req)
default:
h.logger.Errorf("unknown cmd: %d", req.Cmd)
resp := gosocks5.NewReply(gosocks5.CmdUnsupported, nil)