Skip to content

Commit bee1d62

Browse files
committed
fix: 传输层 path 应以 / 开头
1 parent 72bc9b9 commit bee1d62

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

backend/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sub-store",
3-
"version": "2.14.378",
3+
"version": "2.14.379",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
55
"main": "src/main.js",
66
"scripts": {

backend/src/core/proxy-utils/index.js

+12
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,18 @@ function lastParse(proxy) {
501501
proxy[`${proxy.network}-opts`].path = ['/'];
502502
}
503503
}
504+
const transportPath = proxy[`${proxy.network}-opts`]?.path;
505+
if (Array.isArray(transportPath)) {
506+
transportPath.forEach((path, index) => {
507+
if (!path.startsWith('/')) {
508+
proxy[`${proxy.network}-opts`].path[index] = `/${path}`;
509+
}
510+
});
511+
} else if (transportPath) {
512+
if (!transportPath.startsWith('/')) {
513+
proxy[`${proxy.network}-opts`].path = `/${transportPath}`;
514+
}
515+
}
504516
if (['', 'off'].includes(proxy.sni)) {
505517
proxy['disable-sni'] = true;
506518
}

0 commit comments

Comments
 (0)