Chore: embed the RuleExtra into Base

This commit is contained in:
yaling888
2022-03-13 01:21:23 +08:00
parent 8fbf93ccc8
commit 46b9a1092d
47 changed files with 1995 additions and 471 deletions

View File

@ -439,7 +439,7 @@ func parseRules(cfg *RawConfig, proxies map[string]C.Proxy) ([]C.Rule, error) {
var (
payload string
target string
params = []string{}
params []string
ruleName = strings.ToUpper(rule[0])
)
@ -456,6 +456,12 @@ func parseRules(cfg *RawConfig, proxies map[string]C.Proxy) ([]C.Rule, error) {
payload = rule[1]
target = rule[2]
case l >= 4:
if ruleName == "MATCH" {
payload = ""
target = rule[1]
params = rule[2:]
break
}
payload = rule[1]
target = rule[2]
params = rule[3:]