From 78f0fd1d12e34b01a4db48b14287abd179536dcf Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Wed, 24 Jun 2026 19:47:55 +0200 Subject: [PATCH] fix h3 alpn for clash #1113 --- sub/clashService.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sub/clashService.go b/sub/clashService.go index a542794..9fcde30 100644 --- a/sub/clashService.go +++ b/sub/clashService.go @@ -222,9 +222,13 @@ func (s *ClashService) ConvertToClashMeta(outbounds *[]map[string]interface{}, b if isTls { proxy["tls"] = tls["enabled"] - // ALPN if exists - if alpn, ok := tls["alpn"].([]interface{}); ok { - proxy["alpn"] = alpn + switch t { + case "hysteria", "hysteria2", "tuic": + proxy["alpn"] = []string{"h3"} + default: + if alpn, ok := tls["alpn"].([]interface{}); ok { + proxy["alpn"] = alpn + } } // Add reality if exists