From 29cf3ca0efbe9dd212224a73a3da7312347f9695 Mon Sep 17 00:00:00 2001 From: Dreamacro <305009791@qq.com> Date: Tue, 10 Dec 2019 17:27:07 +0800 Subject: [PATCH] Fix: should initial compatible provider --- config/config.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/config.go b/config/config.go index 28d4b377..d867282a 100644 --- a/config/config.go +++ b/config/config.go @@ -298,6 +298,18 @@ func parseProxies(cfg *rawConfig) (proxies map[string]C.Proxy, providersMap map[ 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{} for _, v := range proxyList { ps = append(ps, proxies[v])