diff --git a/transport/v2raygrpclite/conn.go b/transport/v2raygrpclite/conn.go index c1f8fd2e..892d8f44 100644 --- a/transport/v2raygrpclite/conn.go +++ b/transport/v2raygrpclite/conn.go @@ -143,7 +143,7 @@ func (c *GunConn) LocalAddr() net.Addr { } func (c *GunConn) RemoteAddr() net.Addr { - return nil + return M.Socksaddr{} } func (c *GunConn) SetDeadline(t time.Time) error { diff --git a/transport/v2raywebsocket/conn.go b/transport/v2raywebsocket/conn.go index 8f06b118..6ed0b0f3 100644 --- a/transport/v2raywebsocket/conn.go +++ b/transport/v2raywebsocket/conn.go @@ -14,6 +14,7 @@ import ( "github.com/sagernet/sing/common/buf" "github.com/sagernet/sing/common/debug" E "github.com/sagernet/sing/common/exceptions" + M "github.com/sagernet/sing/common/metadata" "github.com/sagernet/ws" "github.com/sagernet/ws/wsutil" ) @@ -232,14 +233,14 @@ func (c *EarlyWebsocketConn) Close() error { func (c *EarlyWebsocketConn) LocalAddr() net.Addr { if c.conn == nil { - return nil + return M.Socksaddr{} } return c.conn.LocalAddr() } func (c *EarlyWebsocketConn) RemoteAddr() net.Addr { if c.conn == nil { - return nil + return M.Socksaddr{} } return c.conn.RemoteAddr() }