From 1282e802b5fa5e91559d840d9b0f06ff975e780b Mon Sep 17 00:00:00 2001 From: yinjianm Date: Sat, 18 Apr 2026 01:23:46 +0800 Subject: [PATCH] t --- app/Protocols/ClashMeta.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/Protocols/ClashMeta.php b/app/Protocols/ClashMeta.php index 2988ecb..b9d93f0 100644 --- a/app/Protocols/ClashMeta.php +++ b/app/Protocols/ClashMeta.php @@ -850,4 +850,17 @@ class ClashMeta extends AbstractProtocol } } } + + protected static function appendEch(&$array, $ech): void + { + if (!$normalized = Helper::normalizeEchSettings($ech)) { + return; + } + + $array['ech-opts'] = array_filter([ + 'enable' => true, + 'config' => Helper::toMihomoEchConfig(data_get($normalized, 'config')), + 'query-server-name' => data_get($normalized, 'query_server_name'), + ], fn($value) => $value !== null); + } }