app

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CaddyAppID = "clienthellod"

	DEFAULT_RESERVOIR_ENTRY_VALID_FOR   = 10 * time.Second
	DEFAULT_RESERVOIR_CLEANING_INTERVAL = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Reservoir

type Reservoir struct {
	ValidFor      caddy.Duration `json:"valid_for,omitempty"`
	CleanInterval caddy.Duration `json:"clean_interval,omitempty"`
	// contains filtered or unexported fields
}

Reservoir implements caddy.App. It is used to store the ClientHello extracted from the incoming TLS by ListenerWrapper for later use by the Handler when ServeHTTP is called.

func (Reservoir) CaddyModule

func (Reservoir) CaddyModule() caddy.ModuleInfo

CaddyModule implements CaddyModule() of caddy.Module. It returns the Caddy module information.

func (*Reservoir) DepositClientHello

func (r *Reservoir) DepositClientHello(addr string, ch *clienthellod.ClientHello)

DepositClientHello stores the TLS ClientHello extracted from the incoming TLS connection into the reservoir, with the client address as the key.

func (*Reservoir) DepositQUICCIP added in v0.3.0

func (r *Reservoir) DepositQUICCIP(addr string, cip *clienthellod.ClientInitialPacket)

DepositQUICCIP stores the QUIC Client Initial Packet extracted from the incoming UDP datagram into the reservoir, with the client address as the key.

func (*Reservoir) Provision

func (r *Reservoir) Provision(ctx caddy.Context) error

Provision implements Provision() of caddy.Provisioner.

func (*Reservoir) Start

func (r *Reservoir) Start() error

Start implements Start() of caddy.App.

func (*Reservoir) Stop

func (r *Reservoir) Stop() error

Stop implements Stop() of caddy.App.

func (*Reservoir) WithdrawClientHello

func (r *Reservoir) WithdrawClientHello(addr string) (ch *clienthellod.ClientHello)

WithdrawClientHello retrieves the ClientHello from the reservoir and deletes it from the reservoir, using the client address as the key.

func (*Reservoir) WithdrawQUICCIP added in v0.3.0

func (r *Reservoir) WithdrawQUICCIP(addr string) (cip *clienthellod.ClientInitialPacket)

WithdrawQUICCIP retrieves the QUIC Client Initial Packet from the reservoir and deletes it from the reservoir, using the client address as the key.

Jump to

Keyboard shortcuts

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