diff --git a/backend/package.json b/backend/package.json index 1cdcba2..775b1f8 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 4ca6890..86c350a 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];