Drop the duplicate proxy setup error log and fix the udp proxy doc comment

This commit is contained in:
Viktor Liu
2026-08-17 13:31:39 +02:00
parent 76abf27d3a
commit 5d807c0491
2 changed files with 2 additions and 3 deletions

View File

@@ -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

View File

@@ -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
}