16 lines
264 B
Go
16 lines
264 B
Go
|
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)
|
||
|
}
|