chore: VLESS HTTP 传输层增加默认 path

This commit is contained in:
xream
2024-02-02 12:44:08 +08:00
parent bbd5341d7a
commit 1a18e65e47
2 changed files with 12 additions and 1 deletions

View File

@@ -317,6 +317,17 @@ function lastParse(proxy) {
if (['hysteria', 'hysteria2'].includes(proxy.type) && !proxy.ports) {
delete proxy.ports;
}
if (['vless'].includes(proxy.type)) {
if (['http'].includes(proxy.network)) {
let transportPath = proxy[`${proxy.network}-opts`]?.path;
if (!transportPath) {
if (!proxy[`${proxy.network}-opts`]) {
proxy[`${proxy.network}-opts`] = {};
}
proxy[`${proxy.network}-opts`].path = ['/'];
}
}
}
return proxy;
}