Feature: add no-resolve for ip rules (#375)

This commit is contained in:
Fndroid
2019-10-28 00:02:23 +08:00
committed by Dreamacro
parent 207371aeae
commit 82a8c03953
12 changed files with 137 additions and 50 deletions

View File

@ -12,7 +12,7 @@ func (f *Match) RuleType() C.RuleType {
return C.MATCH
}
func (f *Match) IsMatch(metadata *C.Metadata) bool {
func (f *Match) Match(metadata *C.Metadata) bool {
return true
}
@ -24,6 +24,10 @@ func (f *Match) Payload() string {
return ""
}
func (f *Match) NoResolveIP() bool {
return false
}
func NewMatch(adapter string) *Match {
return &Match{
adapter: adapter,