chore: remove AddrType on Metadata
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user