Skip to content

Commit

Permalink
chore: VLESS HTTP 传输层增加默认 path
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Feb 2, 2024
1 parent bbd5341 commit 1a18e65
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.14.198",
"version": "2.14.199",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
Expand Down
11 changes: 11 additions & 0 deletions backend/src/core/proxy-utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1a18e65

Please sign in to comment.