package
1.1.2
Repository: https://github.com/michael2008/caddy.git
Documentation: pkg.go.dev

# Functions

Detect detects if the proxy protocol used.
NewConn will wrap an existing net.Conn using `deadline` to receive the header.
NewListener will wrap nl, automatically handling PROXY headers for all connections.
Parse will parse detect and return a V1 or V2 header, otherwise InvalidHeaderErr is returned.

# Constants

CmdLocal indicates the connection was established on purpose by the proxy without being relayed.
CmdProxy the connection was established on behalf of another node, and reflects the original connection endpoints.

# Structs

Conn wraps a net.Conn using the PROXY protocol to determin LocalAddr() and RemoteAddr().
HeaderV1 contains information relayed by the PROXY protocol version 1 (human-readable) header.
HeaderV2 contains information relayed by the PROXY protocol version 2 (binary) header.
InvalidHeaderErr contains the parsing error as well as all data read from the reader.
Listener wraps a net.Listener automatically wrapping new connections with PROXY protocol support.
Rule contains configuration for a single subnet.

# Interfaces

Header provides information decoded from a PROXY header.

# Type aliases

Cmd indicates the PROXY command being used.