Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CombinedIPRange ¶
type CombinedIPRange struct {
// The IP ranges to combine.
PartsRaw []json.RawMessage `json:"parts,omitempty" caddy:"namespace=http.ip_sources inline_key=source"`
// contains filtered or unexported fields
}
This module combines the prefixes returned by several other IP source plugins. In a caddyfile, you can specify these in the block following the "combine" tag.
func (CombinedIPRange) CaddyModule ¶
func (c CombinedIPRange) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*CombinedIPRange) GetIPRanges ¶
func (c *CombinedIPRange) GetIPRanges(r *http.Request) (result []netip.Prefix)
func (*CombinedIPRange) UnmarshalCaddyfile ¶
func (c *CombinedIPRange) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile implements caddyfile.Unmarshaler.
An example configuration you might use while experimenting with different ways to put your site behind Cloudflare:
combine {
# For access via Cloudflare directly, using github.com/WeidiDeng/caddy-cloudflare-ip
cloudflare
# For access using cloudflared container on the same Docker network, using github.com/fvbommel/caddy-dns-ip-range
dns cloudflared
}
Click to show internal directories.
Click to hide internal directories.