Fix: unsupported rule should throw error

This commit is contained in:
Dreamacro 2019-11-04 23:07:19 +08:00
parent e103040158
commit e48ccdd4c8

View file

@ -482,6 +482,8 @@ func parseRules(cfg *rawConfig, proxies map[string]C.Proxy) ([]C.Rule, error) {
// deprecated when bump to 1.0
case "FINAL":
parsed = R.NewMatch(target)
default:
parseErr = fmt.Errorf("unsupported rule type %s", rule[0])
}
if parseErr != nil {