proxyprotocol

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TrustedProxies    []string      `mapstructure:"trusted_proxies"`
	ReadHeaderTimeout time.Duration `mapstructure:"read_header_timeout"`
	// contains filtered or unexported fields
}

Config enables PROXY protocol on one TCP application listener.

func (*Config) InitDefaults

func (c *Config) InitDefaults(address string) error

InitDefaults validates the TCP address and builds the proxy trust policy.

func (*Config) Wrap

func (c *Config) Wrap(listener net.Listener) (net.Listener, error)

Wrap returns the original listener for a nil config. Other configs require InitDefaults.

Jump to

Keyboard shortcuts

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