mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 04:49:03 +08:00
fix: 传输层 path 应以 / 开头
This commit is contained in:
parent
72bc9b9456
commit
bee1d62a1a
@ -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": {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user