From 75f802f607b7e166479553710f89048a1b07edde Mon Sep 17 00:00:00 2001 From: xream Date: Tue, 5 Dec 2023 12:43:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=BB=98=E8=AE=A4=20User-Agent=20?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20clash.meta=20=E5=90=8E,=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E8=AE=A2=E9=98=85=E9=A2=84=E5=A4=84=E7=90=86=E5=99=A8?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91,=20=E5=87=8F=E5=B0=91=20Base64=20?= =?UTF-8?q?=E8=AF=AF=E5=88=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/core/proxy-utils/preprocessors/index.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/package.json b/backend/package.json index d60e71e..c39a4c8 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.110", + "version": "2.14.111", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/core/proxy-utils/preprocessors/index.js b/backend/src/core/proxy-utils/preprocessors/index.js index f495d59..1c57cf0 100644 --- a/backend/src/core/proxy-utils/preprocessors/index.js +++ b/backend/src/core/proxy-utils/preprocessors/index.js @@ -40,7 +40,9 @@ function Base64Encoded() { function Clash() { const name = 'Clash Pre-processor'; const test = function (raw) { - return /proxies/.test(raw); + if (!/proxies/.test(raw)) return false; + const content = safeLoad(raw); + return content.proxies && Array.isArray(content.proxies); }; const parse = function (raw) { // Clash YAML format @@ -108,4 +110,4 @@ function FullConfig() { return { name, test, parse }; } -export default [HTML(), Base64Encoded(), Clash(), SSD(), FullConfig()]; +export default [HTML(), Clash(), Base64Encoded(), SSD(), FullConfig()];