Versions in this module Expand all Collapse all v0 v0.0.7 Jul 24, 2023 v0.0.6 Jul 22, 2023 Changes in this version + var DefaultHostDenylist = []string + var DefaultIPv4Denylist = []string + var DefaultIPv4DenylistRanges = []string + var DefaultIPv6Denylist = []string + var DefaultIPv6DenylistRanges = []string + var DefaultPortAllowList = []int + var DefaultSchemeAllowList = []string + type NetworkPolicy struct + AllowPortList map[int]struct{} + AllowRanger cidranger.Ranger + AllowRules map[string]*regexp.Regexp + AllowSchemeList map[string]struct{} + DenyPortList map[int]struct{} + DenyRanger cidranger.Ranger + DenyRules map[string]*regexp.Regexp + DenySchemeList map[string]struct{} + Options *Options + func New(options Options) (*NetworkPolicy, error) + func (r NetworkPolicy) Validate(host string) bool + func (r NetworkPolicy) ValidateAddress(IP string) bool + func (r NetworkPolicy) ValidateAddressWithPort(IP string, port int) bool + func (r NetworkPolicy) ValidateHost(host string) (string, bool) + func (r NetworkPolicy) ValidatePort(port int) bool + func (r NetworkPolicy) ValidateURLWithIP(host string, ip string) bool + type Options struct + AllowList []string + AllowPortList []int + AllowSchemeList []string + DenyList []string + DenyPortList []int + DenySchemeList []string + var DefaultOptions Options