pancheri/blackhole.go

16 lines
264 B
Go
Raw Normal View History

2023-10-03 17:54:57 +00:00
package pancheri
import "slices"
type BlackholeFile struct {
DenyDomains []string `yaml:"deny_domains"`
}
type Blackholer struct {
DenyDomains []string
}
func (b *Blackholer) ShouldBlock(domain string) bool {
return slices.Contains(b.DenyDomains, domain)
}