proxyprotocol

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListenerWrapper

type ListenerWrapper struct {
	// Wrapper is the name of this wrapper for the JSON config.
	// DO NOT USE this. This is a special value to represent this wrapper.
	// It will be overwritten when we are marshalled.
	Wrapper ListenerWrapperName `json:"wrapper"`

	// Timeout specifies an optional maximum time for
	// the PROXY header to be received.
	// If zero, timeout is disabled. Default is 5s.
	Timeout kengine.Duration `json:"timeout,omitempty"`

	// Allow is an optional list of CIDR ranges to
	// allow/require PROXY headers from.
	Allow []string `json:"allow,omitempty"`
}

ListenerWrapper provides PROXY protocol support to Kengine by implementing the kengine.ListenerWrapper interface. It must be loaded before the `tls` listener.

Credit goes to https://github.com/mastercactapus/kengine2-proxyprotocol for having initially implemented this as a plugin.

type ListenerWrapperName

type ListenerWrapperName string

func (ListenerWrapperName) MarshalJSON

func (ListenerWrapperName) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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