From d0f255d9c61e262ab8255b980634c11b69a326ed Mon Sep 17 00:00:00 2001 From: xream Date: Tue, 30 Jan 2024 02:17:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20h2=20=E4=BC=A0=E8=BE=93=E5=B1=82?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20host=20=E4=B8=BA=E6=95=B0=E7=BB=84,=20path?= =?UTF-8?q?=20=E4=B8=8D=E4=B8=BA=E6=95=B0=E7=BB=84?= 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 | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index ed2d2e9..e887b13 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.192", + "version": "2.14.193", "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 4deeded..f2043a1 100644 --- a/backend/src/core/proxy-utils/index.js +++ b/backend/src/core/proxy-utils/index.js @@ -266,9 +266,13 @@ function lastParse(proxy) { } if (proxy.network === 'h2') { const host = proxy['h2-opts']?.headers?.host; + const path = proxy['h2-opts']?.path; if (host && !Array.isArray(host)) { proxy['h2-opts'].headers.host = [host]; } + if (Array.isArray(path)) { + proxy['h2-opts'].path = path[0]; + } } if (proxy.tls && !proxy.sni) { if (proxy.network) {