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
path: root/sub
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2024-10-29 14:50:25 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2024-10-29 14:50:25 +0300
commite359b5c75e192e03870ae6c201c065740dc13016 (patch)
treec12afc5dde5a7d3c2b227443e00e4466d7f7a3c2 /sub
parent3b3bd3dea4552ced8f8e09c4357ef61e829d2756 (diff)
removed - XTLS Security
because its too old and no one use it anymore
Diffstat (limited to 'sub')
-rw-r--r--sub/subService.go67
1 files changed, 2 insertions, 65 deletions
diff --git a/sub/subService.go b/sub/subService.go
index 33d2e065..2838e932 100644
--- a/sub/subService.go
+++ b/sub/subService.go
@@ -452,38 +452,7 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string {
}
}
- if security == "xtls" {
- params["security"] = "xtls"
- xtlsSetting, _ := stream["xtlsSettings"].(map[string]interface{})
- alpns, _ := xtlsSetting["alpn"].([]interface{})
- var alpn []string
- for _, a := range alpns {
- alpn = append(alpn, a.(string))
- }
- if len(alpn) > 0 {
- params["alpn"] = strings.Join(alpn, ",")
- }
- if sniValue, ok := searchKey(xtlsSetting, "serverName"); ok {
- params["sni"], _ = sniValue.(string)
- }
- xtlsSettings, _ := searchKey(xtlsSetting, "settings")
- if xtlsSetting != nil {
- if fpValue, ok := searchKey(xtlsSettings, "fingerprint"); ok {
- params["fp"], _ = fpValue.(string)
- }
- if insecure, ok := searchKey(xtlsSettings, "allowInsecure"); ok {
- if insecure.(bool) {
- params["allowInsecure"] = "1"
- }
- }
- }
-
- if streamNetwork == "tcp" && len(clients[clientIndex].Flow) > 0 {
- params["flow"] = clients[clientIndex].Flow
- }
- }
-
- if security != "tls" && security != "reality" && security != "xtls" {
+ if security != "tls" && security != "reality" {
params["security"] = "none"
}
@@ -676,39 +645,7 @@ func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string
}
}
- if security == "xtls" {
- params["security"] = "xtls"
- xtlsSetting, _ := stream["xtlsSettings"].(map[string]interface{})
- alpns, _ := xtlsSetting["alpn"].([]interface{})
- var alpn []string
- for _, a := range alpns {
- alpn = append(alpn, a.(string))
- }
- if len(alpn) > 0 {
- params["alpn"] = strings.Join(alpn, ",")
- }
- if sniValue, ok := searchKey(xtlsSetting, "serverName"); ok {
- params["sni"], _ = sniValue.(string)
- }
-
- xtlsSettings, _ := searchKey(xtlsSetting, "settings")
- if xtlsSetting != nil {
- if fpValue, ok := searchKey(xtlsSettings, "fingerprint"); ok {
- params["fp"], _ = fpValue.(string)
- }
- if insecure, ok := searchKey(xtlsSettings, "allowInsecure"); ok {
- if insecure.(bool) {
- params["allowInsecure"] = "1"
- }
- }
- }
-
- if streamNetwork == "tcp" && len(clients[clientIndex].Flow) > 0 {
- params["flow"] = clients[clientIndex].Flow
- }
- }
-
- if security != "tls" && security != "reality" && security != "xtls" {
+ if security != "tls" && security != "reality" {
params["security"] = "none"
}