app

package
v0.5.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CaddyAppID = "clienthellod"

	DEFAULT_TLS_FP_TTL  = clienthellod.DEFAULT_TLSFINGERPRINT_EXPIRY  // TODO: select a reasonable value
	DEFAULT_QUIC_FP_TTL = clienthellod.DEFAULT_QUICFINGERPRINT_EXPIRY // TODO: select a reasonable value
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Reservoir

type Reservoir struct {
	// TlsTTL (Time-to-Live) is the duration for which each TLS fingerprint
	// is valid. The entry will remain in the reservoir for at most this
	// duration.
	//
	// There are scenarios an entry gets removed sooner than this duration, including
	// when a TLS ClientHello is successfully served by the handler.
	TlsTTL caddy.Duration `json:"tls_ttl,omitempty"`

	// QuicTTL (Time-to-Live) is the duration for which each QUIC fingerprint
	// is valid. The entry will remain in the reservoir for at most this
	// duration.
	//
	// Given the fact that some implementations would prefer reusing the previously established
	// QUIC connection instead of establishing a new one everytime, it is recommended to set
	// a longer TTL for QUIC.
	QuicTTL caddy.Duration `json:"quic_ttl,omitempty"`
	// contains filtered or unexported fields
}

Reservoir implements caddy.App and caddy.Provisioner. 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) GetLastQUICVisitor

func (r *Reservoir) GetLastQUICVisitor(ip string) (string, bool)

GetLastQUICVisitor returns the last QUIC visitor for the given IP address.

func (*Reservoir) NewQUICVisitor

func (r *Reservoir) NewQUICVisitor(ip, fullKey string)

NewQUICVisitor updates the map entry for the given IP address.

func (*Reservoir) Provision

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

Provision implements Provision() of caddy.Provisioner.

func (*Reservoir) QUICFingerprinter

func (r *Reservoir) QUICFingerprinter() *clienthellod.QUICFingerprinter

QUICFingerprinter returns the QUICFingerprinter instance.

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) TLSFingerprinter

func (r *Reservoir) TLSFingerprinter() *clienthellod.TLSFingerprinter

TLSFingerprinter returns the TLSFingerprinter instance.

Jump to

Keyboard shortcuts

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