From 1a18e65e47cdbecb69aeee57030c8f81869fde82 Mon Sep 17 00:00:00 2001 From: xream Date: Fri, 2 Feb 2024 12:44:08 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20VLESS=20HTTP=20=E4=BC=A0=E8=BE=93?= =?UTF-8?q?=E5=B1=82=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/core/proxy-utils/index.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index bb22acf..334cc48 100644 --- a/backend/package.json +++ b/backend/package.json @@ -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": { diff --git a/backend/src/core/proxy-utils/index.js b/backend/src/core/proxy-utils/index.js index 5d92fff..4b535c4 100644 --- a/backend/src/core/proxy-utils/index.js +++ b/backend/src/core/proxy-utils/index.js @@ -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; }