chore: Initialize provider ahead of time

This commit is contained in:
Skyxim 2022-05-05 21:14:46 +08:00
parent 27aa026568
commit b3295262c1

View File

@ -76,15 +76,15 @@ func ApplyConfig(cfg *config.Config, force bool) {
updateProxies(cfg.Proxies, cfg.Providers)
updateRules(cfg.Rules, cfg.RuleProviders)
updateSniffer(cfg.Sniffer)
updateHosts(cfg.Hosts)
updateDNS(cfg.DNS)
loadProxyProvider(cfg.Providers)
loadRuleProvider(cfg.RuleProviders)
updateGeneral(cfg.General, force)
updateIPTables(cfg)
updateTun(cfg.Tun, cfg.DNS)
updateExperimental(cfg)
updateHosts(cfg.Hosts)
loadProxyProvider(cfg.Providers)
updateProfile(cfg)
loadRuleProvider(cfg.RuleProviders)
log.SetLevel(cfg.General.LogLevel)
}