l4quic

package
v0.0.0-...-ce42594 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QUICAcceptTimeout = 100 * time.Millisecond

	QUICCertificateCommonName     = "layer4"
	QUICCertificateOrganization   = "caddy"
	QUICCertificateSubjectAltName = "*"
	QUICCertificateValidityPeriod = time.Hour * 24 * 365 * 20

	QUICLongHeaderBitValue uint8 = 0x80 // github.com/quic-go/quic-go/internal/wire.IsLongHeaderPacket()
	QUICMagicBitValue      uint8 = 0x40 // github.com/quic-go/quic-go/internal/wire.IsPotentialQUICPacket()

	QUICPacketBytesMax = 1452 // github.com/quic-go/quic-go/internal/protocol.MaxPacketBufferSize
	QUICPacketBytesMin = 1200 // github.com/quic-go/quic-go/internal/protocol.MinInitialPacketSize
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MatchQUIC

type MatchQUIC struct {
	MatchersRaw caddy.ModuleMap `json:"-" caddy:"namespace=tls.handshake_match"`
	// contains filtered or unexported fields
}

MatchQUIC is able to match QUIC connections. Its structure is different from the auto-generated documentation. This value should be a map of matcher names to their values.

func (*MatchQUIC) CaddyModule

func (m *MatchQUIC) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*MatchQUIC) MarshalJSON

func (m *MatchQUIC) MarshalJSON() ([]byte, error)

MarshalJSON satisfies the json.Marshaler interface.

func (*MatchQUIC) Match

func (m *MatchQUIC) Match(cx *layer4.Connection) (bool, error)

Match returns true if the connection looks like QUIC.

func (*MatchQUIC) Provision

func (m *MatchQUIC) Provision(ctx caddy.Context) error

Provision prepares m's internal structures.

func (*MatchQUIC) UnmarshalCaddyfile

func (m *MatchQUIC) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile sets up the MatchQUIC from Caddyfile tokens. Syntax:

quic {
	<matcher> [<args...>]
	<matcher> [<args...>]
}
quic <matcher> [<args...>]
quic

func (*MatchQUIC) UnmarshalJSON

func (m *MatchQUIC) UnmarshalJSON(b []byte) error

UnmarshalJSON satisfies the json.Unmarshaler interface.

Jump to

Keyboard shortcuts

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