mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
fix: 传输层 path 应以 / 开头
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user