diff --git a/backend/package.json b/backend/package.json index 6f0f0d0..5850661 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.7", + "version": "2.14.8", "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 13afd0b..ffa6fc4 100644 --- a/backend/src/core/proxy-utils/parsers/index.js +++ b/backend/src/core/proxy-utils/parsers/index.js @@ -23,12 +23,19 @@ function URI_SS() { }; content = content.split('#')[0]; // strip proxy name // handle IPV4 and IPV6 - const serverAndPort = content.match(/@([^/]*)(\/|$)/)[1]; + let serverAndPortArray = content.match(/@([^/]*)(\/|$)/); + let userInfoStr = Base64.decode(content.split('@')[0]); + if (!serverAndPortArray) { + content = Base64.decode(content); + userInfoStr = content.split('@')[0]; + serverAndPortArray = content.match(/@([^/]*)(\/|$)/); + } + const serverAndPort = serverAndPortArray[1]; const portIdx = serverAndPort.lastIndexOf(':'); proxy.server = serverAndPort.substring(0, portIdx); proxy.port = serverAndPort.substring(portIdx + 1); - const userInfo = Base64.decode(content.split('@')[0]).split(':'); + const userInfo = userInfoStr.split(':'); proxy.cipher = userInfo[0]; proxy.password = userInfo[1];