Documentation ¶
Index ¶
- Constants
- type Reservoir
- func (Reservoir) CaddyModule() caddy.ModuleInfo
- func (r *Reservoir) DepositClientHello(addr string, ch *clienthellod.ClientHello)
- func (r *Reservoir) DepositQUICCIP(addr string, cip *clienthellod.ClientInitialPacket)
- func (r *Reservoir) Provision(ctx caddy.Context) error
- func (r *Reservoir) Start() error
- func (r *Reservoir) Stop() error
- func (r *Reservoir) WithdrawClientHello(addr string) (ch *clienthellod.ClientHello)
- func (r *Reservoir) WithdrawQUICCIP(addr string) (cip *clienthellod.ClientInitialPacket)
Constants ¶
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) 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.