From 0646fa96a688d2896bd22e508bf1edec14886db7 Mon Sep 17 00:00:00 2001 From: "Christine." Date: Mon, 21 Apr 2025 00:50:32 +0800 Subject: [PATCH] Fix:VLESS URL decoding with network type error, #3388 (#3390) --- src/utils/uri-parser.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/uri-parser.ts b/src/utils/uri-parser.ts index 8e55be79..c1476373 100644 --- a/src/utils/uri-parser.ts +++ b/src/utils/uri-parser.ts @@ -578,7 +578,9 @@ function URI_VLESS(line: string): IProxyVlessConfig { proxy.network = "ws"; httpupgrade = true; } else { - proxy.network = "tcp"; + proxy.network = ["tcp", "ws", "http", "grpc", "h2"].includes(params.type) + ? (params.type as NetworkType) + : "tcp"; } if (!proxy.network && isShadowrocket && params.obfs) { switch (params.type) {