From f9d120bac3874ed1beea586ee65c52f4c480ec99 Mon Sep 17 00:00:00 2001 From: xream Date: Thu, 13 Feb 2025 20:26:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=BC=E5=AE=B9=20v2rayN=20=E9=9D=9E?= =?UTF-8?q?=E6=A0=87=20TUIC=20URI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/core/proxy-utils/parsers/index.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/package.json b/backend/package.json index 775b1f80d..6d5e44e83 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.16.39", + "version": "2.16.40", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/parsers/index.js b/backend/src/core/proxy-utils/parsers/index.js index 86c350a21..1751e9b3f 100644 --- a/backend/src/core/proxy-utils/parsers/index.js +++ b/backend/src/core/proxy-utils/parsers/index.js @@ -839,8 +839,11 @@ function URI_TUIC() { const parse = (line) => { line = line.split(/tuic:\/\//)[1]; // eslint-disable-next-line no-unused-vars - let [__, uuid, password, server, ___, port, ____, addons = '', name] = - /^(.*?):(.*?)@(.*?)(:(\d+))?\/?(\?(.*?))?(?:#(.*?))?$/.exec(line); + let [__, auth, server, port, addons = '', name] = + /^(.*?)@(.*?)(?::(\d+))?\/?(?:\?(.*?))?(?:#(.*?))?$/.exec(line); + auth = decodeURIComponent(auth); + let [uuid, ...passwordParts] = auth.split(':'); + let password = passwordParts.join(':'); port = parseInt(`${port}`, 10); if (isNaN(port)) { port = 443;