From c0f1a926e588303051a6a3e977ed2948e6dfd764 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Wed, 14 Jun 2023 17:06:56 +0330 Subject: 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 --- sub/subService.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sub/subService.go') 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) -- cgit v1.2.3