From 9563df231c3e7acf4ef80f8252589c94dd355680 Mon Sep 17 00:00:00 2001 From: xream Date: Fri, 13 Mar 2026 20:20:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20closes=20#556;=20mihomo=20=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E4=BB=8E=E5=85=A8=E5=B1=80=E9=85=8D=E7=BD=AE=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=9A=84=20global-client-fingerprint;=20=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E7=9A=84=20client-fingerprint=20=E4=BB=85=E7=94=A8?= =?UTF-8?q?=E4=BA=8E=20reality?= 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 | 12 +----------- backend/src/core/proxy-utils/producers/clashmeta.js | 5 ++--- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/backend/package.json b/backend/package.json index dbda62c5..967e0e5e 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.21.46", + "version": "2.21.47", "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 47524f57..df9e2c1d 100644 --- a/backend/src/core/proxy-utils/preprocessors/index.js +++ b/backend/src/core/proxy-utils/preprocessors/index.js @@ -103,21 +103,11 @@ function Clash() { }, ); - const { - proxies, - 'global-client-fingerprint': globalClientFingerprint, - } = safeLoad(afterReplace); + const { proxies } = safeLoad(afterReplace); return ( (includeProxies ? 'proxies:\n' : '') + proxies .map((p) => { - if ( - globalClientFingerprint && - ['trojan', 'vmess', 'vless'].includes(p.type) && - !p['client-fingerprint'] - ) { - p['client-fingerprint'] = globalClientFingerprint; - } return `${includeProxies ? ' - ' : ''}${JSON.stringify( p, )}\n`; diff --git a/backend/src/core/proxy-utils/producers/clashmeta.js b/backend/src/core/proxy-utils/producers/clashmeta.js index 08d7a8ce..2dc4a339 100644 --- a/backend/src/core/proxy-utils/producers/clashmeta.js +++ b/backend/src/core/proxy-utils/producers/clashmeta.js @@ -73,9 +73,8 @@ export default function ClashMeta_Producer() { return true; }) .map((proxy) => { - if (['trojan', 'vmess', 'vless'].includes(proxy.type)) { - proxy['client-fingerprint'] = - proxy['client-fingerprint'] || 'chrome'; + if (proxy['reality-opts'] && !proxy['client-fingerprint']) { + proxy['client-fingerprint'] = 'chrome'; } if (proxy.type === 'vmess') { // handle vmess aead