Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WrapInProxyProto ¶
WrapInProxyProto wraps the given listener in the PROXY protocol. If behavior is "use_if_authorized" or "deny_if_unauthorized" it also configures a SourceCheck based on the given ProxyProtoConfig. In an error case it returns the original listener and the error.
Types ¶
type ProxyProtoConfig ¶
type ProxyProtoConfig struct { sync.RWMutex Behavior string AuthorizedAddrs []*sockaddr.SockAddrMarshaler `json:"authorized_addrs"` }
ProxyProtoConfig contains configuration for the PROXY protocol
func (*ProxyProtoConfig) SetAuthorizedAddrs ¶
func (p *ProxyProtoConfig) SetAuthorizedAddrs(addrs interface{}) error
Click to show internal directories.
Click to hide internal directories.