fix: group filter add not matched proxies at the end

This commit is contained in:
wwqgtxx 2022-10-31 21:50:30 +08:00
parent 2a24effac0
commit 5dab89c9ec

View file

@ -136,6 +136,13 @@ func (gb *GroupBase) GetProxies(touch bool) []C.Proxy {
} }
} }
} }
for _, p := range proxies { // add not matched proxies at the end
name := p.Name()
if _, ok := proxiesSet[name]; !ok {
proxiesSet[name] = struct{}{}
newProxies = append(newProxies, p)
}
}
proxies = newProxies proxies = newProxies
} }