chore: cleanup dns policy match code

This commit is contained in:
wwqgtxx
2024-08-15 20:04:24 +08:00
parent 4c10d42fbf
commit 92ec5f2236
9 changed files with 241 additions and 420 deletions

View File

@@ -28,6 +28,7 @@ const (
ProcessPathRegex
RuleSet
DomainSet
IpCidrSet
Network
Uid
SubRules
@@ -93,6 +94,8 @@ func (rt RuleType) String() string {
return "RuleSet"
case DomainSet:
return "DomainSet"
case IpCidrSet:
return "IpCidrSet"
case Network:
return "Network"
case DSCP:
@@ -121,3 +124,8 @@ type Rule interface {
ShouldFindProcess() bool
ProviderNames() []string
}
type RuleGroup interface {
Rule
GetRecodeSize() int
}

View File

@@ -1,17 +0,0 @@
package constant
import (
"github.com/metacubex/mihomo/component/geodata/router"
)
type RuleGeoSite interface {
GetDomainMatcher() router.DomainMatcher
}
type RuleGeoIP interface {
GetIPMatcher() *router.GeoIPMatcher
}
type RuleGroup interface {
GetRecodeSize() int
}