feat: rule-provider support rules field

This commit is contained in:
adlyq
2022-05-03 00:53:22 +08:00
parent 7db07630a7
commit 259736390a
2 changed files with 6 additions and 5 deletions

View File

@ -28,7 +28,8 @@ type RulePayload struct {
key: Domain or IP Cidr
value: Rule type or is empty
*/
Rules []string `yaml:"payload"`
Rules []string `yaml:"payload"`
Rules2 []string `yaml:"rules"`
}
type ruleStrategy interface {
@ -144,5 +145,5 @@ func rulesParse(buf []byte) (interface{}, error) {
return nil, err
}
return rulePayload.Rules, nil
return append(rulePayload.Rules, rulePayload.Rules2...), nil
}