From 34901b3ef6a2e7668bb48dcc39a0c16c65fc02e0 Mon Sep 17 00:00:00 2001 From: xream Date: Thu, 8 Jan 2026 17:23:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20mihomo=20=E4=BB=8E=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=8E=B7=E5=8F=96=E7=9A=84=20global-client-f?= =?UTF-8?q?ingerprint=20=E5=92=8C=E9=BB=98=E8=AE=A4=E7=9A=84=20client-fing?= =?UTF-8?q?erprint=20=E4=BB=85=E7=94=A8=E4=BA=8E=20VMess/VLESS/Trojan=20?= =?UTF-8?q?=E5=8D=8F=E8=AE=AE?= 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 | 7 +++++-- backend/src/core/proxy-utils/producers/clashmeta.js | 6 ++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/backend/package.json b/backend/package.json index b09e8672..8af25d90 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.20.75", + "version": "2.20.76", "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 fbe6e356..47524f57 100644 --- a/backend/src/core/proxy-utils/preprocessors/index.js +++ b/backend/src/core/proxy-utils/preprocessors/index.js @@ -111,8 +111,11 @@ function Clash() { (includeProxies ? 'proxies:\n' : '') + proxies .map((p) => { - // https://github.com/MetaCubeX/mihomo/blob/Alpha/docs/config.yaml#L73C1-L73C26 - if (globalClientFingerprint && !p['client-fingerprint']) { + if ( + globalClientFingerprint && + ['trojan', 'vmess', 'vless'].includes(p.type) && + !p['client-fingerprint'] + ) { p['client-fingerprint'] = globalClientFingerprint; } return `${includeProxies ? ' - ' : ''}${JSON.stringify( diff --git a/backend/src/core/proxy-utils/producers/clashmeta.js b/backend/src/core/proxy-utils/producers/clashmeta.js index 8d207f97..e321b36c 100644 --- a/backend/src/core/proxy-utils/producers/clashmeta.js +++ b/backend/src/core/proxy-utils/producers/clashmeta.js @@ -73,8 +73,10 @@ export default function ClashMeta_Producer() { return true; }) .map((proxy) => { - proxy['client-fingerprint'] = - proxy['client-fingerprint'] || 'chrome'; + if (['trojan', 'vmess', 'vless'].includes(proxy.type)) { + proxy['client-fingerprint'] = + proxy['client-fingerprint'] || 'chrome'; + } if (proxy.type === 'vmess') { // handle vmess aead if (isPresent(proxy, 'aead')) {