Fix: proxy provider filter validation (#2198)

This commit is contained in:
gVisor bot 2022-06-30 17:08:53 +08:00
parent 19441f5e4d
commit 192ae06fe5

View File

@ -129,7 +129,7 @@ func NewProxySetProvider(name string, interval time.Duration, filter string, veh
proxies := []C.Proxy{}
for idx, mapping := range schema.Proxies {
if name, ok := mapping["name"]; ok && len(filter) > 0 && !filterReg.MatchString(name.(string)) {
if name, ok := mapping["name"].(string); ok && len(filter) > 0 && !filterReg.MatchString(name) {
continue
}
proxy, err := adapter.ParseProxy(mapping)