From 10ec8a25a2012faf7265519dff9908ad350ad2fc Mon Sep 17 00:00:00 2001 From: xream Date: Fri, 19 Jul 2024 09:45:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=84=E7=90=86=E4=B8=8D=E8=A7=84?= =?UTF-8?q?=E8=8C=83=E7=9A=84=20hysteria2=20=E8=8A=82=E7=82=B9?= 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 | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index 52db704..6b8a4f9 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.351", + "version": "2.14.352", "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 e583e39..b8ee40a 100644 --- a/backend/src/core/proxy-utils/index.js +++ b/backend/src/core/proxy-utils/index.js @@ -414,6 +414,15 @@ function lastParse(proxy) { if (['hysteria', 'hysteria2'].includes(proxy.type) && !proxy.ports) { delete proxy.ports; } + if ( + ['hysteria2'].includes(proxy.type) && + proxy.obfs && + !['salamander'].includes(proxy.obfs) && + !proxy['obfs-password'] + ) { + proxy['obfs-password'] = proxy.obfs; + proxy.obfs = 'salamander'; + } if (['vless'].includes(proxy.type)) { // 删除 reality-opts: {} if (