feat: add override-destination for sniffer

This commit is contained in:
Skyxim
2023-01-23 14:08:11 +08:00
parent df1f6e2b99
commit 096bb8d439
9 changed files with 48 additions and 26 deletions

View File

@ -19,7 +19,7 @@ func (ds *DomainSuffix) RuleType() C.RuleType {
}
func (ds *DomainSuffix) Match(metadata *C.Metadata) (bool, string) {
domain := metadata.Host
domain := metadata.RuleHost()
return strings.HasSuffix(domain, "."+ds.suffix) || domain == ds.suffix, ds.adapter
}