vault: Index | Files

package proxyutil

import ""


Package Files


func WrapInProxyProto Uses

func WrapInProxyProto(listener net.Listener, config *ProxyProtoConfig) (net.Listener, error)

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.

type ProxyProtoConfig Uses

type ProxyProtoConfig struct {
    Behavior        string
    AuthorizedAddrs []*sockaddr.SockAddrMarshaler `json:"authorized_addrs"`

ProxyProtoConfig contains configuration for the PROXY protocol

func (*ProxyProtoConfig) SetAuthorizedAddrs Uses

func (p *ProxyProtoConfig) SetAuthorizedAddrs(addrs interface{}) error

Package proxyutil imports 8 packages (graph) and is imported by 4 packages. Updated 2019-05-08. Refresh now. Tools for package owners.