Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadInitialAWSData ¶
LoadInitialAWSData loads ip ranges from https://ip-ranges.amazonaws.com/ip-ranges.json
Types ¶
type AWSData ¶
type AWSData struct {
SyncToken string `json:"syncToken"`
CreateDate string `json:"createDate"`
Prefixes []AWSIPRange `json:"prefixes"`
IPv6Prefixes []AWSIPv6Range `json:"ipv6_prefixes"`
}
func (AWSData) GetPrefixes ¶
GetPrefixes returns all prefixes (both IPv4 and IPv6) in the AWSData struct as a slice of strings
type AWSIPRange ¶
type AWSIPRange struct {
IPPrefix string `json:"ip_prefix"`
}
type AWSIPv6Range ¶
type AWSIPv6Range struct {
IPPrefix string `json:"ipv6_prefix"`
}
type BlockAWS ¶
type BlockAWS struct {
// contains filtered or unexported fields
}
BlockAWS is a Caddy module that blocks all AWS IP addresses taken from https://ip-ranges.amazonaws.com/ip-ranges.json
func (BlockAWS) CaddyModule ¶
func (BlockAWS) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
Click to show internal directories.
Click to hide internal directories.