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')) {