fix recorder clientIP

This commit is contained in:
ginuerzh
2024-09-15 18:37:49 +08:00
parent b39aa63f75
commit ce2da421fa
9 changed files with 9 additions and 0 deletions
+1
View File
@@ -95,6 +95,7 @@ func (h *socks4Handler) Handle(ctx context.Context, conn net.Conn, opts ...handl
Time: start,
SID: string(ctxvalue.SidFromContext(ctx)),
}
ro.ClientIP, _, _ = net.SplitHostPort(conn.RemoteAddr().String())
log := h.options.Logger.WithFields(map[string]any{
"remote": conn.RemoteAddr().String(),
+1
View File
@@ -97,6 +97,7 @@ func (h *socks5Handler) Handle(ctx context.Context, conn net.Conn, opts ...handl
Time: start,
SID: string(ctxvalue.SidFromContext(ctx)),
}
ro.ClientIP, _, _ = net.SplitHostPort(conn.RemoteAddr().String())
log := h.options.Logger.WithFields(map[string]any{
"remote": conn.RemoteAddr().String(),