diff --git a/backend/package.json b/backend/package.json index 40ba6b1..613de6e 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.128", + "version": "2.14.129", "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 430c608..f8eb7c3 100644 --- a/backend/src/core/proxy-utils/parsers/index.js +++ b/backend/src/core/proxy-utils/parsers/index.js @@ -409,10 +409,10 @@ function URI_VLESS() { function URI_Hysteria2() { const name = 'URI Hysteria2 Parser'; const test = (line) => { - return /^hysteria2:\/\//.test(line); + return /^(hysteria2|hy2):\/\//.test(line); }; const parse = (line) => { - line = line.split('hysteria2://')[1]; + line = line.split(/(hysteria2|hy2):\/\//)[2]; // eslint-disable-next-line no-unused-vars let [__, password, server, ___, port, addons, name] = /^(.*?)@(.*?)(:(\d+))?\/?\?(.*?)(?:#(.*?))$/.exec(line);