mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-03-10 10:09:56 +00:00
chore: the resolve and findProcess behaviors of Logic and SubRules follow the order and needs of the internal rules
This commit is contained in:
@@ -91,9 +91,7 @@ type RuleProvider interface {
|
||||
Provider
|
||||
Behavior() RuleBehavior
|
||||
Count() int
|
||||
Match(*constant.Metadata) bool
|
||||
ShouldResolveIP() bool
|
||||
ShouldFindProcess() bool
|
||||
Match(metadata *constant.Metadata, helper constant.RuleMatchHelper) bool
|
||||
Strategy() any
|
||||
}
|
||||
|
||||
|
||||
@@ -111,14 +111,17 @@ func (rt RuleType) String() string {
|
||||
|
||||
type Rule interface {
|
||||
RuleType() RuleType
|
||||
Match(metadata *Metadata) (bool, string)
|
||||
Match(metadata *Metadata, helper RuleMatchHelper) (bool, string)
|
||||
Adapter() string
|
||||
Payload() string
|
||||
ShouldResolveIP() bool
|
||||
ShouldFindProcess() bool
|
||||
ProviderNames() []string
|
||||
}
|
||||
|
||||
type RuleMatchHelper struct {
|
||||
ResolveIP func()
|
||||
FindProcess func()
|
||||
}
|
||||
|
||||
type RuleGroup interface {
|
||||
Rule
|
||||
GetRecodeSize() int
|
||||
|
||||
Reference in New Issue
Block a user