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>2023-06-14 16:36:56 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-06-14 16:36:56 +0300
commitc0f1a926e588303051a6a3e977ed2948e6dfd764 (patch)
tree8fba0c1e8a798db483f831e9937d1971933a9d3c /sub
parent970dd0915e060345076a0bcad1435931c3551679 (diff)
update - security "none"
security set to none when tls, reality, xtls are not set its because when there is no security none on trojan link some app like v2rayn set tls for your config
Diffstat (limited to 'sub')
-rw-r--r--sub/subService.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/sub/subService.go b/sub/subService.go
index 1cd340aa..6d787023 100644
--- a/sub/subService.go
+++ b/sub/subService.go
@@ -434,6 +434,10 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string {
}
}
+ if security != "tls" && security != "reality" && security != "xtls" {
+ params["security"] = "none"
+ }
+
link := fmt.Sprintf("vless://%s@%s:%d", uuid, address, port)
url, _ := url.Parse(link)
q := url.Query()
@@ -638,6 +642,10 @@ func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string
}
}
+ if security != "tls" && security != "reality" && security != "xtls" {
+ params["security"] = "none"
+ }
+
link := fmt.Sprintf("trojan://%s@%s:%d", password, address, port)
url, _ := url.Parse(link)