Fix: crash when dns not set

This commit is contained in:
Dreamacro
2018-12-05 21:52:31 +08:00
parent f192d591c7
commit f93d6aa294
4 changed files with 19 additions and 10 deletions

View File

@ -95,6 +95,9 @@ func readConfig(path string) (*rawConfig, error) {
Rule: []string{},
Proxy: []map[string]interface{}{},
ProxyGroup: []map[string]interface{}{},
DNS: &rawDNS{
Enable: false,
},
}
err = yaml.Unmarshal([]byte(data), &rawConfig)
return rawConfig, err