From 764e1ba165c7408c97fc418343b643e1abf0e473 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Sat, 28 Mar 2026 20:49:25 +0100 Subject: [PATCH] fix: update ECH handling in ClashService --- sub/clashService.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sub/clashService.go b/sub/clashService.go index 13a09cb..f403117 100644 --- a/sub/clashService.go +++ b/sub/clashService.go @@ -256,9 +256,8 @@ func (s *ClashService) ConvertToClashMeta(outbounds *[]map[string]interface{}, b proxy["skip-cert-verify"] = insecure } // ech outbounds - if ech, ok := tls["ech"].(interface{}); ok { - ech_data, _ := ech.(map[string]interface{}) - ech_config, _ := ech_data["config"].([]interface{}) + if ech, ok := tls["ech"].(map[string]interface{}); ok && ech["enabled"].(bool) { + ech_config, _ := ech["config"].([]interface{}) ech_string := "" for i := 1; i < len(ech_config)-1; i++ { ech_string += ech_config[i].(string)