diff --git a/transport/vmess/websocket.go b/transport/vmess/websocket.go index cc747803..71dabbdd 100644 --- a/transport/vmess/websocket.go +++ b/transport/vmess/websocket.go @@ -306,6 +306,9 @@ func (wsedc *websocketWithEarlyDataConn) LazyHeadroom() bool { } func (wsedc *websocketWithEarlyDataConn) Upstream() any { + if wsedc.Conn == nil { // ensure return a nil interface not an interface with nil value + return nil + } return wsedc.Conn }