diff options
| author | mhsanaei <ho3ein.sanaei@gmail.com> | 2024-10-29 14:50:25 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2024-10-29 14:50:25 +0300 |
| commit | e359b5c75e192e03870ae6c201c065740dc13016 (patch) | |
| tree | c12afc5dde5a7d3c2b227443e00e4466d7f7a3c2 /sub | |
| parent | 3b3bd3dea4552ced8f8e09c4357ef61e829d2756 (diff) | |
removed - XTLS Security
because its too old and no one use it anymore
Diffstat (limited to 'sub')
| -rw-r--r-- | sub/subService.go | 67 |
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" } |
