add clientIP for handler recorder object

This commit is contained in:
ginuerzh
2024-09-15 18:28:24 +08:00
parent f681f7aa03
commit b39aa63f75
12 changed files with 77 additions and 8 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ func (h *socks5Handler) Handle(ctx context.Context, conn net.Conn, opts ...handl
if clientID := sc.ID(); clientID != "" {
ctx = ctxvalue.ContextWithClientID(ctx, ctxvalue.ClientID(clientID))
log = log.WithFields(map[string]any{"user": clientID})
ro.Client = clientID
ro.ClientID = clientID
}
conn = sc