Fix: should initial compatible provider

This commit is contained in:
gVisor bot 2019-12-10 17:27:07 +08:00
parent 9eff6c4465
commit fb02956013

View file

@ -298,6 +298,18 @@ func parseProxies(cfg *rawConfig) (proxies map[string]C.Proxy, providersMap map[
proxies[groupName] = outbound.NewProxy(group) proxies[groupName] = outbound.NewProxy(group)
} }
// initial compatible provier
for _, pd := range providersMap {
if pd.VehicleType() != provider.Compatible {
continue
}
log.Infoln("Start initial compatible provider %s", pd.Name())
if err := pd.Initial(); err != nil {
return nil, nil, err
}
}
ps := []C.Proxy{} ps := []C.Proxy{}
for _, v := range proxyList { for _, v := range proxyList {
ps = append(ps, proxies[v]) ps = append(ps, proxies[v])