Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type URLIPRange ¶
type URLIPRange struct {
// List of URLs to fetch the IP ranges from.
URLs []string `json:"url"`
// refresh Interval
Interval caddy.Duration `json:"interval,omitempty"`
// request Timeout
Timeout caddy.Duration `json:"timeout,omitempty"`
// Number of retries for fetching the IP list.
// Default is 2 when unspecified. Set explicitly to 0 to disable retries.
Retries *int `json:"retries,omitempty"`
// Optional path to a cache file. If not set, a file under Caddy's data
// directory will be used, derived from the URLs.
CacheFile string `json:"cache_file,omitempty"`
// contains filtered or unexported fields
}
URLIPRange provides a range of IP address prefixes (CIDRs) retrieved from url.
func (URLIPRange) CaddyModule ¶
func (URLIPRange) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*URLIPRange) GetIPRanges ¶
func (s *URLIPRange) GetIPRanges(_ *http.Request) []netip.Prefix
func (*URLIPRange) UnmarshalCaddyfile ¶
func (m *URLIPRange) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile implements caddyfile.Unmarshaler.
list {
interval val
timeout val
url string
}
Click to show internal directories.
Click to hide internal directories.