From f16ebf9bfeaac55b2e203af9f2436c4897ac65b7 Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Mon, 18 Dec 2023 23:22:50 +0800 Subject: [PATCH] chore: add leading slash to ws-path --- transport/vmess/websocket.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/transport/vmess/websocket.go b/transport/vmess/websocket.go index acca049f..f6914199 100644 --- a/transport/vmess/websocket.go +++ b/transport/vmess/websocket.go @@ -338,6 +338,10 @@ func streamWebsocketConn(ctx context.Context, conn net.Conn, c *WebsocketConfig, RawQuery: u.RawQuery, } + if !strings.HasPrefix(uri.Path, "/") { + uri.Path = "/" + uri.Path + } + if c.TLS { uri.Scheme = "wss" config := c.TLSConfig