Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProxyProtocolV1HeaderInvalid = errors.New("PROXY Protocol v1 header is invalid") ErrProxyProtocolV2HeaderInvalid = errors.New("PROXY Protocol v2 header is invalid") ErrProxyProtocolInvalid = errors.New("Invalid PROXY Protocol Header") ErrHeaderReadTimeout = errors.New("Header read timeout") )
Functions ¶
func IsProxyProtocolError ¶
func NewLazyListener ¶ added in v1.0.1
func NewLazyListener(listener net.Listener, allowedIPs string, headerReadTimeout int, fallbackable bool) (net.Listener, error)
Create new PROXY protocol listener for lazy mode. Lazy mode means PROXY protocol header will be processed at first `Read` call. * listener is basic listener for TCP * allowedIPs is protocol allowed addresses or CIDRs split by `,` if use '*' means allow any address * headerReadTimeout is timeout for PROXY protocol header read
func NewListener ¶
func NewListener(listener net.Listener, allowedIPs string, headerReadTimeout int, fallbackable bool) (net.Listener, error)
Create new PROXY protocol listener * listener is basic listener for TCP * allowedIPs is protocol allowed addresses or CIDRs split by `,` if use '*' means allow any address * headerReadTimeout is timeout for PROXY protocol header read
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.