From 5e2a87e250ed9a1d0f2280e48086e4aa967befe7 Mon Sep 17 00:00:00 2001 From: xream Date: Wed, 12 Feb 2025 19:21:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Shadowsocks=20URI?= =?UTF-8?q?=20=E8=A7=A3=E6=9E=90?= 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 | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/package.json b/backend/package.json index 1cdcba239..775b1f80d 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.16.38", + "version": "2.16.39", "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 4ca6890e3..86c350a21 100644 --- a/backend/src/core/proxy-utils/parsers/index.js +++ b/backend/src/core/proxy-utils/parsers/index.js @@ -152,6 +152,7 @@ function URI_SS() { query = parsed[2]; } content = Base64.decode(content); + if (query) { if (/(&|\?)v2ray-plugin=/.test(query)) { const parsed = query.match(/(&|\?)v2ray-plugin=(.*?)(&|$)/); @@ -165,8 +166,8 @@ function URI_SS() { } content = `${content}${query}`; } - userInfoStr = content.split('@')[0]; - serverAndPortArray = content.match(/@([^/]*)(\/|$)/); + userInfoStr = content.match(/(^.*)@/)?.[1]; + serverAndPortArray = content.match(/@([^/@]*)(\/|$)/); } else if (content.includes('?')) { const parsed = content.match(/(\?.*)$/); query = parsed[1];