diff --git a/backend/package.json b/backend/package.json index 5107ba4..9b0fde8 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.41", + "version": "2.14.42", "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 47a0e4d..cb66f55 100644 --- a/backend/src/core/proxy-utils/index.js +++ b/backend/src/core/proxy-utils/index.js @@ -220,6 +220,17 @@ function lastParse(proxy) { ? [proxy.server] : proxy.server; } + // 统一将 VMess 和 VLESS 的 http 传输层的 path 和 Host 处理为数组 + if (['vmess', 'vless'].includes(proxy.type) && proxy.network === 'http') { + let transportPath = proxy[`${proxy.network}-opts`]?.path; + let transportHost = proxy[`${proxy.network}-opts`]?.headers?.Host; + if (transportHost && !Array.isArray(transportHost)) { + proxy[`${proxy.network}-opts`].headers.Host = [transportHost]; + } + if (transportPath && !Array.isArray(transportPath)) { + proxy[`${proxy.network}-opts`].path = [transportPath]; + } + } return proxy; }