Feature: add experimental config for resolving ip fail behavior

This commit is contained in:
Dreamacro
2019-04-24 12:02:52 +08:00
parent 90e3dccacd
commit cec2206774
5 changed files with 65 additions and 30 deletions

View File

@ -27,6 +27,7 @@ func ApplyConfig(cfg *config.Config, force bool) {
updateProxies(cfg.Proxies)
updateRules(cfg.Rules)
updateDNS(cfg.DNS)
updateExperimental(cfg.Experimental)
}
func GetGeneral() *config.General {
@ -41,6 +42,10 @@ func GetGeneral() *config.General {
}
}
func updateExperimental(c *config.Experimental) {
T.Instance().UpdateExperimental(c.IgnoreResolveFail)
}
func updateDNS(c *config.DNS) {
if c.Enable == false {
T.Instance().SetResolver(nil)