diff --git a/backend/package.json b/backend/package.json index e9818776b..ae3382fc2 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.141", + "version": "2.14.142", "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 e08e6d425..02f88dcdb 100644 --- a/backend/src/core/proxy-utils/parsers/index.js +++ b/backend/src/core/proxy-utils/parsers/index.js @@ -332,8 +332,8 @@ function URI_VLESS() { const parse = (line) => { line = line.split('vless://')[1]; // eslint-disable-next-line no-unused-vars - let [__, uuid, server, port, addons, name] = - /^(.*?)@(.*?):(\d+)\/?\?(.*?)(?:#(.*?))$/.exec(line); + let [__, uuid, server, port, ___, addons = '', name] = + /^(.*?)@(.*?):(\d+)\/?(\?(.*?))?(?:#(.*?))$/.exec(line); port = parseInt(`${port}`, 10); uuid = decodeURIComponent(uuid); name = decodeURIComponent(name) ?? `VLESS ${server}:${port}`; @@ -414,8 +414,8 @@ function URI_Hysteria2() { const parse = (line) => { line = line.split(/(hysteria2|hy2):\/\//)[2]; // eslint-disable-next-line no-unused-vars - let [__, password, server, ___, port, addons, name] = - /^(.*?)@(.*?)(:(\d+))?\/?\?(.*?)(?:#(.*?))$/.exec(line); + let [__, password, server, ___, port, ____, addons = '', name] = + /^(.*?)@(.*?)(:(\d+))?\/?(\?(.*?))?(?:#(.*?))$/.exec(line); port = parseInt(`${port}`, 10); if (isNaN(port)) { port = 443;