From 5d807c049159270b2ef784f6378b1d8007814ec9 Mon Sep 17 00:00:00 2001 From: Viktor Liu Date: Mon, 17 Aug 2026 13:31:39 +0200 Subject: [PATCH] Drop the duplicate proxy setup error log and fix the udp proxy doc comment --- client/iface/wgproxy/udp/proxy.go | 2 +- client/internal/peer/conn.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/client/iface/wgproxy/udp/proxy.go b/client/iface/wgproxy/udp/proxy.go index dd0e09e83..a0895c8c7 100644 --- a/client/iface/wgproxy/udp/proxy.go +++ b/client/iface/wgproxy/udp/proxy.go @@ -51,7 +51,7 @@ func NewWGUDPProxy(wgPort int, mtu uint16) *WGUDPProxy { return p } -// AddRelayedConn +// AddRelayedConn dials the local WireGuard port and stores the relayed connection. // The provided Context must be non-nil. If the context expires before // the connection is complete, an error is returned. Once successfully // connected, any expiration of the context will not affect the diff --git a/client/internal/peer/conn.go b/client/internal/peer/conn.go index 7fd486e54..c61881a30 100644 --- a/client/internal/peer/conn.go +++ b/client/internal/peer/conn.go @@ -879,8 +879,7 @@ func (conn *Conn) newProxy(remoteConn net.Conn) (wgproxy.Proxy, error) { wgProxy := conn.config.WgConfig.WgInterface.GetProxy() if err := wgProxy.AddRelayedConn(conn.ctx, udpAddr, remoteConn); err != nil { - conn.Log.Errorf("failed to add relayed net.Conn to local proxy: %v", err) - return nil, err + return nil, fmt.Errorf("add relayed conn to proxy: %w", err) } return wgProxy, nil }