Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-05-07 19:29:06 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-05-07 19:29:06 +0300
commit9bbcb74db6a935d19cf5c79c0bade33bdb253bfb (patch)
tree195e912844094f09c09ebe458c79fa53cc56ee9e /web/service/sub.go
parent515e7f7fef3fe359aa0d23fa766535688c74efe3 (diff)
sni for xtls
Diffstat (limited to 'web/service/sub.go')
-rw-r--r--web/service/sub.go6
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 {