diff --git a/backend/package.json b/backend/package.json index 6ff2c1b5f..224ae7026 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.378", + "version": "2.14.379", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/index.js b/backend/src/core/proxy-utils/index.js index ddf0d06e9..4f2a4f0cb 100644 --- a/backend/src/core/proxy-utils/index.js +++ b/backend/src/core/proxy-utils/index.js @@ -501,6 +501,18 @@ function lastParse(proxy) { proxy[`${proxy.network}-opts`].path = ['/']; } } + const transportPath = proxy[`${proxy.network}-opts`]?.path; + if (Array.isArray(transportPath)) { + transportPath.forEach((path, index) => { + if (!path.startsWith('/')) { + proxy[`${proxy.network}-opts`].path[index] = `/${path}`; + } + }); + } else if (transportPath) { + if (!transportPath.startsWith('/')) { + proxy[`${proxy.network}-opts`].path = `/${transportPath}`; + } + } if (['', 'off'].includes(proxy.sni)) { proxy['disable-sni'] = true; }