From 21b78edd8bf65e7a860dcba0f865cd1f55c559a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sun, 9 Jun 2024 10:03:12 +0800 Subject: [PATCH] Fix missing address unwrap in redirect server --- redirect_server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redirect_server.go b/redirect_server.go index 1915bcb..7727cba 100644 --- a/redirect_server.go +++ b/redirect_server.go @@ -74,7 +74,7 @@ func (s *redirectServer) loopIn() { } var metadata M.Metadata metadata.Protocol = ProtocolRedirect - metadata.Source = M.SocksaddrFromNet(conn.RemoteAddr()) + metadata.Source = M.SocksaddrFromNet(conn.RemoteAddr()).Unwrap() destination, err := control.GetOriginalDestination(conn) if err != nil { _ = conn.SetLinger(0) @@ -82,7 +82,7 @@ func (s *redirectServer) loopIn() { s.logger.Error("process connection from ", metadata.Source, ": invalid connection: ", err) continue } - metadata.Destination = M.SocksaddrFromNetIP(destination) + metadata.Destination = M.SocksaddrFromNetIP(destination).Unwrap() go s.handler.NewConnection(s.ctx, conn, metadata) } }