diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-05-07 19:29:06 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-05-07 19:29:06 +0300 |
| commit | 9bbcb74db6a935d19cf5c79c0bade33bdb253bfb (patch) | |
| tree | 195e912844094f09c09ebe458c79fa53cc56ee9e /web/service/sub.go | |
| parent | 515e7f7fef3fe359aa0d23fa766535688c74efe3 (diff) | |
sni for xtls
Diffstat (limited to 'web/service/sub.go')
| -rw-r--r-- | web/service/sub.go | 6 |
1 files changed, 6 insertions, 0 deletions
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 { |
