support http,socks,mixed links

This commit is contained in:
Alireza Ahmadi
2025-08-04 19:32:24 +02:00
parent 371eb9ece8
commit 55b6272204
2 changed files with 37 additions and 1 deletions
+9
View File
@@ -481,6 +481,7 @@ func getTls(security string, q *url.Values) *map[string]interface{} {
tls_sni := q.Get("sni")
tls_insecure := q.Get("allowInsecure")
tls_alpn := q.Get("alpn")
tls_ech := q.Get("ech")
switch security {
case "tls":
tls["enabled"] = true
@@ -507,5 +508,13 @@ func getTls(security string, q *url.Values) *map[string]interface{} {
"fingerprint": tls_fp,
}
}
if len(tls_ech) > 0 {
tls["ech"] = map[string]interface{}{
"enabled": true,
"config": []string{
tls_ech,
},
}
}
return &tls
}