From 3d3ad2358e1ad8070b735dc53780a27cb8a47910 Mon Sep 17 00:00:00 2001 From: Konstantin Pichugin Date: Tue, 6 Jan 2026 03:23:43 +0300 Subject: [PATCH] edit nodes config,api,checks,dash --- sub/subService.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sub/subService.go b/sub/subService.go index 0bc291bc..ab746a26 100644 --- a/sub/subService.go +++ b/sub/subService.go @@ -552,7 +552,14 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string { externalProxies, _ := stream["externalProxy"].([]any) // Generate links for each node address (or external proxy) - links := make([]string, 0) + // Pre-allocate capacity based on external proxies or node addresses + var initialCapacity int + if len(externalProxies) > 0 { + initialCapacity = len(externalProxies) + } else { + initialCapacity = len(nodeAddresses) + } + links := make([]string, 0, initialCapacity) // First, handle external proxies if any if len(externalProxies) > 0 {