From 9d29fc8a09430bcee1266735540d50805148e20a Mon Sep 17 00:00:00 2001 From: xream Date: Tue, 2 Jul 2024 20:39:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=84=E7=90=86=20reality-opts=20?= =?UTF-8?q?=E4=B8=BA=20{}=20=E7=9A=84=E6=83=85=E5=86=B5?= 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 | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index 3791e62..81d5d75 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.345", + "version": "2.14.346", "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 6b1086b..dbf46f6 100644 --- a/backend/src/core/proxy-utils/index.js +++ b/backend/src/core/proxy-utils/index.js @@ -408,6 +408,13 @@ function lastParse(proxy) { delete proxy.ports; } if (['vless'].includes(proxy.type)) { + // 删除 reality-opts: {} + if ( + proxy['reality-opts'] && + Object.keys(proxy['reality-opts']).length === 0 + ) { + delete proxy['reality-opts']; + } // 非 reality, 空 flow 没有意义 if (!proxy['reality-opts'] && !proxy.flow) { delete proxy.flow;