Update handler.go

This commit is contained in:
RPRX 2025-06-06 01:53:57 +00:00 committed by GitHub
parent 4894154a5e
commit f84b6f9537
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -289,7 +289,7 @@ func (h *Handler) Dial(ctx context.Context, dest net.Destination) (stat.Connecti
origin, _, err := net.SplitHostPort(inbound.Conn.LocalAddr().String()) origin, _, err := net.SplitHostPort(inbound.Conn.LocalAddr().String())
if err == nil { if err == nil {
ob.Gateway = net.ParseAddress(origin) ob.Gateway = net.ParseAddress(origin)
errors.LogInfo(ctx, "use receive package ip as snedthrough: ", origin) errors.LogDebug(ctx, "use receive package ip as snedthrough: ", origin)
} }
} }
} }
@ -299,7 +299,7 @@ func (h *Handler) Dial(ctx context.Context, dest net.Destination) (stat.Connecti
clientaddr, _, err := net.SplitHostPort(inbound.Conn.RemoteAddr().String()) clientaddr, _, err := net.SplitHostPort(inbound.Conn.RemoteAddr().String())
if err == nil { if err == nil {
ob.Gateway = net.ParseAddress(clientaddr) ob.Gateway = net.ParseAddress(clientaddr)
errors.LogInfo(ctx, "use client src ip as snedthrough: ", clientaddr) errors.LogDebug(ctx, "use client src ip as snedthrough: ", clientaddr)
} }
} }