mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2026-11-28 15:33:47 +00:00
feat: mihomo 从全局配置获取的 global-client-fingerprint 和默认的 client-fingerprint 仅用于 VMess/VLESS/Trojan 协议
This commit is contained in:
3 files changed
+10
-5
No files matched your search
@@ -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": {
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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')) {
|
||||
|
||||
Reference in new issue
Block a user