fix: Rule-Set中不解析DNS

feat: RULE-SET支持no-resolve
This commit is contained in:
adlyq
2022-05-18 18:43:44 +08:00
parent b5623602f5
commit 8b09db5f7f
6 changed files with 18 additions and 21 deletions

View File

@ -8,9 +8,8 @@ import (
)
type domainStrategy struct {
shouldResolveIP bool
count int
domainRules *trie.DomainTrie[bool]
count int
domainRules *trie.DomainTrie[bool]
}
func (d *domainStrategy) Match(metadata *C.Metadata) bool {
@ -22,7 +21,7 @@ func (d *domainStrategy) Count() int {
}
func (d *domainStrategy) ShouldResolveIP() bool {
return d.shouldResolveIP
return false
}
func (d *domainStrategy) OnUpdate(rules []string) {
@ -55,5 +54,5 @@ func ruleParse(ruleRaw string) (string, string, []string) {
}
func NewDomainStrategy() *domainStrategy {
return &domainStrategy{shouldResolveIP: false}
return &domainStrategy{}
}