Test nested groups recursively in URLTest

This commit is contained in:
世界
2026-08-30 17:41:47 +08:00
parent dd9cdbc712
commit 66beaf541e
6 changed files with 130 additions and 138 deletions
+13 -4
View File
@@ -180,9 +180,18 @@ func (s *Selector) NewPacketConnection(ctx context.Context, conn N.PacketConn, m
}
}
func RealTag(detour adapter.Outbound) string {
if group, isGroup := detour.(adapter.OutboundGroup); isGroup {
return group.Now()
func RealTag(outboundManager adapter.OutboundManager, detour adapter.Outbound) string {
tag := detour.Tag()
for {
group, isGroup := detour.(adapter.OutboundGroup)
if !isGroup {
return tag
}
tag = group.Now()
var loaded bool
detour, loaded = outboundManager.Outbound(tag)
if !loaded {
return tag
}
}
return detour.Tag()
}