l4proxyprotocol

package
v0.0.0-...-8b6e8b6 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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