Versions in this module Expand all Collapse all v0 v0.0.1 Sep 13, 2026 Changes in this version + func BlacklistListener(ln net.Listener, disallow ...string) (net.Listener, error) + func WhitelistListener(ln net.Listener, allow ...string) (net.Listener, error) + type Blacklist struct + func NewBlacklist() *Blacklist + func (bl *Blacklist) Allowed(ip string) bool + func (bl *Blacklist) AllowedAddr(addr netip.Addr) bool + func (bl *Blacklist) Disallow(addrs ...string) error + func (bl *Blacklist) DisallowAddr(addrs ...netip.Addr) + func (bl *Blacklist) DisallowPrefix(addrs ...netip.Prefix) + type Whitelist struct + func NewWhitelist() *Whitelist + func (wl *Whitelist) Allow(addrs ...string) error + func (wl *Whitelist) AllowAddr(addrs ...netip.Addr) + func (wl *Whitelist) AllowPrefix(addrs ...netip.Prefix) + func (wl *Whitelist) Allowed(ip string) bool + func (wl *Whitelist) AllowedAddr(addr netip.Addr) bool