l4proxyprotocol

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConn

func GetConn(cx *layer4.Connection) net.Conn

GetConn gets the connection which holds the information received from the PROXY protocol.

Types

type Handler

type Handler struct {
	// How long to wait for the PROXY protocol header to be received.
	// Defaults to zero, which means timeout is disabled.
	Timeout caddy.Duration `json:"timeout,omitempty"`

	// An optional list of CIDR ranges to allow/require PROXY headers from.
	Allow []string `json:"allow,omitempty"`
	// contains filtered or unexported fields
}

Handler is a connection handler that accepts the PROXY protocol.

func (Handler) CaddyModule

func (Handler) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Handler) Handle

func (h *Handler) Handle(cx *layer4.Connection, next layer4.Handler) error

Handle handles the connections.

func (*Handler) Provision

func (h *Handler) Provision(ctx caddy.Context) error

Provision sets up the module.

type MatchProxyProtocol

type MatchProxyProtocol struct{}

func (MatchProxyProtocol) CaddyModule

func (MatchProxyProtocol) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (MatchProxyProtocol) Match

func (m MatchProxyProtocol) Match(cx *layer4.Connection) (bool, error)

Match returns true if the connection looks like it is using the Proxy Protocol.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL