From 37906b73120e387a0c6c06a3dc67393c6698fc2a Mon Sep 17 00:00:00 2001 From: Konstantin Pichugin Date: Tue, 6 Jan 2026 03:20:58 +0300 Subject: [PATCH] edit nodes config,api,checks,dash --- sub/subService.go | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/sub/subService.go b/sub/subService.go index 41c7d67d..0bc291bc 100644 --- a/sub/subService.go +++ b/sub/subService.go @@ -552,8 +552,7 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string { externalProxies, _ := stream["externalProxy"].([]any) // Generate links for each node address (or external proxy) - links := "" - linkIndex := 0 + links := make([]string, 0) // First, handle external proxies if any if len(externalProxies) > 0 { @@ -583,13 +582,9 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string { url.Fragment = s.genRemark(inbound, email, ep["remark"].(string)) - if linkIndex > 0 { - links += "\n" - } - links += url.String() - linkIndex++ + links = append(links, url.String()) } - return links + return strings.Join(links, "\n") } // Generate links for each node address @@ -607,14 +602,10 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string { url.Fragment = s.genRemark(inbound, email, "") - if linkIndex > 0 { - links += "\n" - } - links += url.String() - linkIndex++ + links = append(links, url.String()) } - return links + return strings.Join(links, "\n") } func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string {