From b062cb5a1493005e43415debc93b70750c00a7a2 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Fri, 12 Jun 2026 01:22:15 +0200 Subject: [PATCH] fix(sub): tag node-hosted entries with the node name in remarks (#5035) An inbound pushed to nodes keeps the same remark on every copy, so a multi-node subscription (and the panel's per-client link view) listed several identically-named entries differing only by address. Append the node name to the remark of node-hosted inbounds unless the admin already included it. --- internal/sub/service.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/internal/sub/service.go b/internal/sub/service.go index 1b2d4f002..522746fe3 100644 --- a/internal/sub/service.go +++ b/internal/sub/service.go @@ -1519,6 +1519,19 @@ func (s *SubService) genRemark(inbound *model.Inbound, email string, extra strin if len(extra) > 0 { orders['o'] = extra } + // A node-hosted inbound usually shares its remark with the local copy it + // was synced from, so a multi-node subscription would list several + // identically-named entries differing only by address (#5035). Tag such + // entries with the node name unless the admin already put it in the remark. + if inbound.NodeID != nil && s.nodesByID != nil { + if n, ok := s.nodesByID[*inbound.NodeID]; ok && n != nil && n.Name != "" && !strings.Contains(orders['i'], n.Name) { + if orders['i'] != "" { + orders['i'] += "@" + n.Name + } else { + orders['i'] = n.Name + } + } + } var remark []string for i := 0; i < len(orderChars); i++ {