add buffer size option for udp connection

This commit is contained in:
ginuerzh
2025-07-30 21:40:53 +08:00
parent b64e5901b6
commit a5309eee97
26 changed files with 218 additions and 219 deletions
+2 -1
View File
@@ -145,6 +145,7 @@ func (h *socks5Handler) Handle(ctx context.Context, conn net.Conn, opts ...handl
}
log.WithFields(map[string]any{
"network": ro.Network,
"duration": time.Since(start),
"inputBytes": ro.InputBytes,
"outputBytes": ro.OutputBytes,
@@ -186,7 +187,7 @@ func (h *socks5Handler) Handle(ctx context.Context, conn net.Conn, opts ...handl
return h.handleMuxBind(ctx, conn, "tcp", address, ro, log)
case gosocks5.CmdUdp:
ro.Network = "udp"
return h.handleUDP(ctx, conn, ro, log)
return h.handleUDP(ctx, conn, "udp", ro, log)
case socks.CmdUDPTun:
ro.Network = "udp"
return h.handleUDPTun(ctx, conn, "udp", address, ro, log)