Change: remove AddrType on Metadata (#2199)

This commit is contained in:
Dreamacro
2022-07-05 20:26:43 +08:00
committed by GitHub
parent 557297ac9a
commit aaf08dadff
10 changed files with 40 additions and 65 deletions

View File

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