diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-06-14 16:36:56 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2023-06-14 16:36:56 +0300 |
| commit | c0f1a926e588303051a6a3e977ed2948e6dfd764 (patch) | |
| tree | 8fba0c1e8a798db483f831e9937d1971933a9d3c /sub | |
| parent | 970dd0915e060345076a0bcad1435931c3551679 (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.go | 8 |
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) |
