feat: fallback can be select by user

This commit is contained in:
adlyq
2022-05-23 00:40:27 +08:00
parent 79469fc8d6
commit c0eb9aac1c
5 changed files with 29 additions and 6 deletions

View File

@@ -76,7 +76,9 @@ func ParseProxyGroup(config map[string]any, proxyMap map[string]C.Proxy, provide
providersMap[groupName] = pd
} else {
if groupOption.URL == "" || groupOption.Interval == 0 {
return nil, errMissHealthCheck
//return nil, errMissHealthCheck
groupOption.URL = "http://www.gstatic.com/generate_204"
groupOption.Interval = 300
}
hc := provider.NewHealthCheck(ps, groupOption.URL, uint(groupOption.Interval), groupOption.Lazy)