diff --git a/backend/package.json b/backend/package.json index beeba2d..1b5580e 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.261", + "version": "2.14.262", "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 9e8c2cc..e38fffe 100644 --- a/backend/src/core/proxy-utils/parsers/index.js +++ b/backend/src/core/proxy-utils/parsers/index.js @@ -547,6 +547,7 @@ function URI_Hysteria2() { proxy.obfs = params.obfs; } + proxy.ports = params.mport; proxy['obfs-password'] = params['obfs-password']; proxy['skip-cert-verify'] = /(TRUE)|1/i.test(params.insecure); proxy.tfo = /(TRUE)|1/i.test(params.fastopen); diff --git a/backend/src/core/proxy-utils/producers/uri.js b/backend/src/core/proxy-utils/producers/uri.js index e66a4fe..9ef86d0 100644 --- a/backend/src/core/proxy-utils/producers/uri.js +++ b/backend/src/core/proxy-utils/producers/uri.js @@ -274,6 +274,9 @@ export default function URI_Producer() { `sni=${encodeURIComponent(proxy.sni)}`, ); } + if (proxy.ports) { + hysteria2params.push(`mport=${proxy.ports}`); + } if (proxy['tls-fingerprint']) { hysteria2params.push( `pinSHA256=${encodeURIComponent(