chore: remove AddrType on Metadata

This commit is contained in:
wwqgtxx
2022-11-11 09:19:28 +08:00
parent 698d8ca701
commit 6dadc2357a
16 changed files with 60 additions and 116 deletions

View File

@ -19,9 +19,6 @@ func (ds *DomainSuffix) RuleType() C.RuleType {
}
func (ds *DomainSuffix) Match(metadata *C.Metadata) (bool, string) {
if metadata.AddrType != C.AtypDomainName {
return false, ""
}
domain := metadata.Host
return strings.HasSuffix(domain, "."+ds.suffix) || domain == ds.suffix, ds.adapter
}