From 06942c67fd4fa620c858243a6f1a2b649633cabc Mon Sep 17 00:00:00 2001 From: admin <2833154405@qq.com> Date: Wed, 23 Feb 2022 16:17:29 +0800 Subject: [PATCH] Fix the filter under proxy-group to filter other groups --- adapter/outboundgroup/common.go | 4 ++++ constant/adapters.go | 13 +++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/adapter/outboundgroup/common.go b/adapter/outboundgroup/common.go index 89144c43..0dc53ef5 100644 --- a/adapter/outboundgroup/common.go +++ b/adapter/outboundgroup/common.go @@ -29,6 +29,10 @@ func getProvidersProxies(providers []provider.ProxyProvider, touch bool, filter //filterReg = regexp.MustCompile(filter) filterReg = regexp2.MustCompile(filter, 0) for _, p := range proxies { + if p.Type() < 8 { + matchedProxies = append(matchedProxies, p) + } + //if filterReg.MatchString(p.Name()) { if mat, _ := filterReg.FindStringMatch(p.Name()); mat != nil { matchedProxies = append(matchedProxies, p) diff --git a/constant/adapters.go b/constant/adapters.go index 73428929..4a6c814f 100644 --- a/constant/adapters.go +++ b/constant/adapters.go @@ -14,6 +14,13 @@ const ( Direct AdapterType = iota Reject Compatible + + Relay + Selector + Fallback + URLTest + LoadBalance + Shadowsocks ShadowsocksR Snell @@ -22,12 +29,6 @@ const ( Vmess Vless Trojan - - Relay - Selector - Fallback - URLTest - LoadBalance ) const (