fix: update ECH handling in ClashService

This commit is contained in:
Alireza Ahmadi
2026-03-28 20:49:25 +01:00
parent fed5298156
commit 764e1ba165
+2 -3
View File
@@ -256,9 +256,8 @@ func (s *ClashService) ConvertToClashMeta(outbounds *[]map[string]interface{}, b
proxy["skip-cert-verify"] = insecure proxy["skip-cert-verify"] = insecure
} }
// ech outbounds // ech outbounds
if ech, ok := tls["ech"].(interface{}); ok { if ech, ok := tls["ech"].(map[string]interface{}); ok && ech["enabled"].(bool) {
ech_data, _ := ech.(map[string]interface{}) ech_config, _ := ech["config"].([]interface{})
ech_config, _ := ech_data["config"].([]interface{})
ech_string := "" ech_string := ""
for i := 1; i < len(ech_config)-1; i++ { for i := 1; i < len(ech_config)-1; i++ {
ech_string += ech_config[i].(string) ech_string += ech_config[i].(string)