From 9bbcb74db6a935d19cf5c79c0bade33bdb253bfb Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sun, 7 May 2023 19:59:06 +0330 Subject: sni for xtls --- web/service/sub.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'web/service') diff --git a/web/service/sub.go b/web/service/sub.go index 3f8b7685..9a86c3eb 100644 --- a/web/service/sub.go +++ b/web/service/sub.go @@ -360,6 +360,9 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string { params["allowInsecure"] = "1" } } + if sniValue, ok := searchKey(xtlsSettings, "serverName"); ok { + params["sni"], _ = sniValue.(string) + } } if streamNetwork == "tcp" && len(clients[clientIndex].Flow) > 0 { @@ -538,6 +541,9 @@ func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string params["allowInsecure"] = "1" } } + if sniValue, ok := searchKey(xtlsSettings, "serverName"); ok { + params["sni"], _ = sniValue.(string) + } } if streamNetwork == "tcp" && len(clients[clientIndex].Flow) > 0 { -- cgit v1.2.3