http.proxyprotocol Plugin
This directive adds PROXY protocol (both v1 and v2) support to Caddy. The PROXY PROTOCOL allows the client IP to be passed through a load balancer like those used in AWS or Google Cloud.
Examples
proxyprotocol
Requires all connections (both IPv4 and IPv6) to specify a PROXY header. Both V1 (human readable) and V2 (binary) protocol versions are supported, and will be auto-detected.
proxyprotocol 10.22.0.0/16 10.23.0.1/32 ::/0
Requires connections from the subnet 10.22.0.0/16
, the IP 10.23.0.1
, and any IPv6 address to specify a PROXY header.
All connections from other sources will still operate normally, as if the proxyprotocol
directive was not in use.
Note It is important to filter to only trusted sources (e.g. proxies, LB),
since it is trivial to spoof the source address otherwise.
proxyprotocol {
timeout 3s
}
Changes the timeout for reading the complete PROXY header to 3 seconds. The default is 5 seconds.
Access the full documentation for this plugin off-site:
DocsGet help from the maintainers of the http.proxyprotocol plugin:
SupportVisit http.proxyprotocol's website for more information:
Website