mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-03-04 12:57:31 +00:00
feat: add mrs format ipcidr ruleset
This commit is contained in:
@@ -112,6 +112,19 @@ func (rt RuleBehavior) String() string {
|
||||
}
|
||||
}
|
||||
|
||||
func (rt RuleBehavior) Byte() byte {
|
||||
switch rt {
|
||||
case Domain:
|
||||
return 0
|
||||
case IPCIDR:
|
||||
return 1
|
||||
case Classical:
|
||||
return 2
|
||||
default:
|
||||
return 255
|
||||
}
|
||||
}
|
||||
|
||||
func ParseBehavior(s string) (behavior RuleBehavior, err error) {
|
||||
switch s {
|
||||
case "domain":
|
||||
|
||||
Reference in New Issue
Block a user