From a19e9cc2d950151a87c2b2d9696b86459aae95c6 Mon Sep 17 00:00:00 2001 From: iKira <4965498+iKira@users.noreply.github.com> Date: Wed, 18 Mar 2026 09:41:07 +0800 Subject: [PATCH] chore: Adapt the `hidden` field for proxy groups Adapts to the `hidden` field in policy groups, the GUI does not display proxy groups tags where `hidden: true`. --- core/src/main/golang/native/tunnel/proxies.go | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/core/src/main/golang/native/tunnel/proxies.go b/core/src/main/golang/native/tunnel/proxies.go index 83ad15ecc0..4b052ca71c 100644 --- a/core/src/main/golang/native/tunnel/proxies.go +++ b/core/src/main/golang/native/tunnel/proxies.go @@ -68,8 +68,11 @@ func QueryProxyGroupNames(excludeNotSelectable bool) []string { } for _, p := range proxies { - if _, ok := p.Adapter().(outboundgroup.ProxyGroup); ok { + if g, ok := p.Adapter().(outboundgroup.ProxyGroup); ok { if !excludeNotSelectable || p.Type() == C.Selector { + if isGroupHidden(g) { + continue + } result = append(result, p.Name()) } } @@ -238,3 +241,17 @@ func collectProviders(providers []provider.ProxyProvider, uiSubtitlePattern *reg return result } + +func isGroupHidden(g outboundgroup.ProxyGroup) bool { + switch v := g.(type) { + case *outboundgroup.Selector: + return v.Hidden + case *outboundgroup.URLTest: + return v.Hidden + case *outboundgroup.Fallback: + return v.Hidden + case *outboundgroup.LoadBalance: + return v.Hidden + } + return false +}