Documentation ¶
Index ¶
Constants ¶
View Source
const CacheTTL = 12 * time.Hour
CacheTTL is the duration before a domain name resolution is evict form the cache.
Variables ¶
View Source
var ErrHostNotAllowed = errors.New("host not allowed")
ErrHostNotAllowed is returned when a host is not allowed.
View Source
var ErrHostRejected = errors.New("rejected host")
ErrHostRejected is returned when the host has been flagged as unwanted.
Functions ¶
This section is empty.
Types ¶
type Approver ¶
type Approver struct {
// contains filtered or unexported fields
}
An Approver is able to check if an host is allowed or not.
func NewAppover ¶
NewAppover returns a new Approver where `stricts' is a slice od allowed hosts and cidrs a slice of allowed IP ranges.
type NameResolver ¶
type NameResolver struct {
// contains filtered or unexported fields
}
A NameResolver is used to filter IPs using name resolution.
func NewNameResolver ¶
func NewNameResolver(allows []string) (*NameResolver, error)
NewNameResolver return a new NameResolver.
Click to show internal directories.
Click to hide internal directories.