feat: add whitelist support

This commit is contained in:
Christian Groschupp
2024-04-15 21:43:09 +02:00
parent 25dcf536c6
commit 77a8f28edc
4 changed files with 23 additions and 1 deletions

View File

@ -37,3 +37,11 @@ func (w *bypassWrapper) Contains(ctx context.Context, network, addr string, opts
}
return bp.Contains(ctx, network, addr, opts...)
}
func (p *bypassWrapper) IsWhitelist() bool {
bp := p.r.get(p.name)
if bp == nil {
return false
}
return bp.IsWhitelist()
}