From a01df2e9056c93c0adf6219dbb26a8b4c07d6621 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Fri, 8 Mar 2024 02:42:01 +0000 Subject: [PATCH] only log client IP (remove port) log game server address --- pkg/udpproxy/session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/udpproxy/session.go b/pkg/udpproxy/session.go index 52c298b..bcb9c53 100644 --- a/pkg/udpproxy/session.go +++ b/pkg/udpproxy/session.go @@ -65,7 +65,7 @@ func (s *Session) proxyTo(buf []byte) error { return err } parts := strings.Split(string(buf), " ") - log.Info("From [", s.caddr, "] Command: ", strings.Join(parts[2:], " ")) + log.Info("From [", s.caddr.IP, "] To [", s.serverConn.RemoteAddr().String(), "] Command: ", strings.Join(parts[2:], " ")) return nil }