From f9b35c7a44ef2b248b1e921316b537048f3c5980 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Mon, 4 Nov 2019 23:07:19 +0800 Subject: [PATCH] Fix: unsupported rule should throw error --- config/config.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/config.go b/config/config.go index aee3129e..3f4da5aa 100644 --- a/config/config.go +++ b/config/config.go @@ -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 {