mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-15 05:31:18 +08:00
feat: rule-provider support NetWork rule
This commit is contained in:
parent
259736390a
commit
52d559bb38
@ -39,10 +39,6 @@ func ParseRule(tp, payload, target string, params []string) (C.Rule, error) {
|
||||
parsed, parseErr = RC.NewProcess(payload, target, true)
|
||||
case "PROCESS-PATH":
|
||||
parsed, parseErr = RC.NewProcess(payload, target, false)
|
||||
case "MATCH":
|
||||
parsed = RC.NewMatch(target)
|
||||
case "RULE-SET":
|
||||
parsed, parseErr = RP.NewRuleSet(payload, target)
|
||||
case "NETWORK":
|
||||
parsed, parseErr = RC.NewNetworkType(payload, target)
|
||||
case "UID":
|
||||
@ -53,6 +49,10 @@ func ParseRule(tp, payload, target string, params []string) (C.Rule, error) {
|
||||
parsed, parseErr = logic.NewOR(payload, target)
|
||||
case "NOT":
|
||||
parsed, parseErr = logic.NewNOT(payload, target)
|
||||
case "RULE-SET":
|
||||
parsed, parseErr = RP.NewRuleSet(payload, target)
|
||||
case "MATCH":
|
||||
parsed = RC.NewMatch(target)
|
||||
default:
|
||||
parseErr = fmt.Errorf("unsupported rule type %s", tp)
|
||||
}
|
||||
|
@ -82,6 +82,8 @@ func parseRule(tp, payload, target string, params []string) (C.Rule, error) {
|
||||
parsed, parseErr = RC.NewProcess(payload, target, true)
|
||||
case "PROCESS-PATH":
|
||||
parsed, parseErr = RC.NewProcess(payload, target, false)
|
||||
case "NETWORK":
|
||||
parsed, parseErr = RC.NewNetworkType(payload, target)
|
||||
default:
|
||||
parseErr = fmt.Errorf("unsupported rule type %s", tp)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user