Feature: add regexp filter to use proxy provider in proxy group

This commit is contained in:
yaling888
2022-06-03 05:05:42 +08:00
parent af5bd0f65e
commit a4d135ed21
6 changed files with 210 additions and 11 deletions

View File

@@ -65,8 +65,13 @@ func (hc *HealthCheck) touch() {
}
func (hc *HealthCheck) check() {
proxies := hc.proxies
if len(proxies) == 0 {
return
}
b, _ := batch.New[bool](context.Background(), batch.WithConcurrencyNum[bool](10))
for _, proxy := range hc.proxies {
for _, proxy := range proxies {
p := proxy
b.Go(p.Name(), func() (bool, error) {
ctx, cancel := context.WithTimeout(context.Background(), defaultURLTestTimeout)