mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-11 15:38:59 +08:00
feat: 统一将 VMess 和 VLESS 的 http 传输层的 path 和 Host 处理为数组
This commit is contained in:
parent
26193301b3
commit
ba78982f41
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.41",
|
"version": "2.14.42",
|
||||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -10,7 +10,7 @@
|
|||||||
"start": "nodemon -w src -w package.json --exec babel-node src/main.js",
|
"start": "nodemon -w src -w package.json --exec babel-node src/main.js",
|
||||||
"build": "gulp",
|
"build": "gulp",
|
||||||
"bundle": "node bundle.js",
|
"bundle": "node bundle.js",
|
||||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
|
"changelog": "conventional-changelog -p cli -i CHANGELOG.md -s"
|
||||||
},
|
},
|
||||||
"author": "Peng-YM",
|
"author": "Peng-YM",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
@ -220,6 +220,17 @@ function lastParse(proxy) {
|
|||||||
? [proxy.server]
|
? [proxy.server]
|
||||||
: 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;
|
return proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user