qlog

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EventSchemaHTTP is the qlog event schema for the HTTP Capsule Protocol,
	// defined in draft-ietf-quic-qlog-h3-events-14.
	// It defines the http:capsule_created and http:capsule_parsed events.
	EventSchemaHTTP = "urn:ietf:params:qlog:events:http-14"
	// EventSchemaConnectIP is the qlog event schema for CONNECT-IP,
	// defined in draft-seemann-masque-connect-ip-qlog-00.
	EventSchemaConnectIP = "urn:ietf:params:qlog:events:http#connect-ip-00"
	// EventSchemaConnectIPDNS is the qlog event schema for the DNS_ASSIGN and PREF64 capsules,
	// defined in draft-seemann-masque-connect-ip-qlog-00.
	EventSchemaConnectIPDNS = "urn:ietf:params:qlog:events:http#connect-ip-dns-00"
)
View Source
const OmitLength = -1

OmitLength indicates that a length should not be logged.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	RequestID uint64
	IPPrefix  netip.Prefix
}

An Address is an address contained in an ADDRESS_ASSIGN or an ADDRESS_REQUEST capsule.

type AddressAssignCapsule

type AddressAssignCapsule struct {
	AssignedAddresses []Address
	Raw               RawInfo
}

An AddressAssignCapsule is an ADDRESS_ASSIGN capsule.

type AddressRequestCapsule

type AddressRequestCapsule struct {
	RequestedAddresses []Address
	Raw                RawInfo
}

An AddressRequestCapsule is an ADDRESS_REQUEST capsule.

type Capsule

type Capsule struct {
	Capsule any
}

Capsule represents a capsule sent or received on the CONNECT-IP request stream.

type CapsuleCreated

type CapsuleCreated struct {
	StreamID quic.StreamID
	Capsule  Capsule
}

func (CapsuleCreated) Encode

func (e CapsuleCreated) Encode(enc *jsontext.Encoder, _ time.Time) error

func (CapsuleCreated) Name

func (e CapsuleCreated) Name() string

type CapsuleParsed

type CapsuleParsed struct {
	StreamID quic.StreamID
	Capsule  Capsule
}

func (CapsuleParsed) Encode

func (e CapsuleParsed) Encode(enc *jsontext.Encoder, _ time.Time) error

func (CapsuleParsed) Name

func (e CapsuleParsed) Name() string

type DNSAssignCapsule

type DNSAssignCapsule struct {
	DNSConfigurations []DNSConfiguration
	Raw               RawInfo
}

A DNSAssignCapsule is a DNS_ASSIGN capsule.

type DNSConfiguration

type DNSConfiguration struct {
	Nameservers     []DNSNameserver
	InternalDomains []string
	SearchDomains   []string
}

A DNSConfiguration is a DNS configuration contained in a DNS_ASSIGN capsule.

type DNSNameserver

type DNSNameserver struct {
	ServicePriority          uint16
	IPv4Addresses            []netip.Addr
	IPv6Addresses            []netip.Addr
	AuthenticationDomainName string
	// ServiceParameters are sorted by key.
	ServiceParameters []DNSServiceParameter
}

A DNSNameserver is a nameserver contained in a DNS configuration.

type DNSServiceParameter

type DNSServiceParameter struct {
	Key   uint16
	Value []byte // the wire-format SvcParamValue
}

A DNSServiceParameter is an SVCB service parameter of a DNS nameserver.

type Endpoint

type Endpoint string

Endpoint is the local application or the peer.

const (
	EndpointApplication Endpoint = "application"
	EndpointPeer        Endpoint = "peer"
)

type ICMP

type ICMP struct {
	Type uint8
	Code uint8
	MTU  uint32
}

ICMP is the ICMP or ICMPv6 message carried in a packet.

type ICMPResponse

type ICMPResponse struct {
	To     Endpoint
	Packet Packet
}

An ICMPResponse is an ICMP message generated in response to a packet.

type IPAddressRange

type IPAddressRange struct {
	StartIP    netip.Addr
	EndIP      netip.Addr
	IPProtocol uint8
}

An IPAddressRange is an IP address range contained in a ROUTE_ADVERTISEMENT capsule.

type IPHeader

type IPHeader interface {
	// contains filtered or unexported methods
}

An IPHeader is an IPv4Header or an IPv6Header.

type IPv4Header

type IPv4Header struct {
	TotalLength        uint16
	TTL                uint8
	Protocol           uint8
	SourceAddress      netip.Addr
	DestinationAddress netip.Addr
}

An IPv4Header is the header of an IPv4 packet.

type IPv6Header

type IPv6Header struct {
	PayloadLength      uint16
	NextHeader         uint8
	HopLimit           uint8
	SourceAddress      netip.Addr
	DestinationAddress netip.Addr
}

An IPv6Header is the fixed header of an IPv6 packet.

type PREF64Capsule

type PREF64Capsule struct {
	Prefixes []netip.Prefix
	Raw      RawInfo
}

A PREF64Capsule is a PREF64 capsule.

type Packet

type Packet struct {
	Header             IPHeader
	UpperLayerProtocol *uint8
	ICMP               *ICMP
	Raw                RawInfo
}

A Packet is an IP packet.

type PacketDropReason

type PacketDropReason string

PacketDropReason is the reason why a packet was dropped.

const (
	PacketDropInvalid                      PacketDropReason = "invalid"
	PacketDropSourceAddressNotAllowed      PacketDropReason = "source_address_not_allowed"
	PacketDropDestinationAddressNotAllowed PacketDropReason = "destination_address_not_allowed"
	PacketDropProtocolNotAllowed           PacketDropReason = "protocol_not_allowed"
	PacketDropHopLimitExceeded             PacketDropReason = "hop_limit_exceeded"
	PacketDropTooLarge                     PacketDropReason = "packet_too_large"
	PacketDropSendError                    PacketDropReason = "send_error"
)

type PacketOutcome

type PacketOutcome string

PacketOutcome is the forwarding decision for a packet.

const (
	PacketForwarded PacketOutcome = "forwarded"
	PacketDropped   PacketOutcome = "dropped"
)

type PacketProcessed

type PacketProcessed struct {
	StreamID     quic.StreamID
	Source       Endpoint
	Packet       Packet
	Outcome      PacketOutcome
	Reason       PacketDropReason
	ICMPResponse *ICMPResponse
}

func (PacketProcessed) Encode

func (e PacketProcessed) Encode(enc *jsontext.Encoder, _ time.Time) error

func (PacketProcessed) Name

func (e PacketProcessed) Name() string

type RawInfo

type RawInfo struct {
	Length        int // full length of the capsule or packet
	PayloadLength int // length of the capsule value or packet payload
}

RawInfo contains capsule or packet lengths. Zero lengths are logged. Set a field to OmitLength to omit it.

func (RawInfo) HasValues

func (i RawInfo) HasValues() bool

type RouteAdvertisementCapsule

type RouteAdvertisementCapsule struct {
	IPAddressRanges []IPAddressRange
	Raw             RawInfo
}

A RouteAdvertisementCapsule is a ROUTE_ADVERTISEMENT capsule.

type UnknownCapsule

type UnknownCapsule struct {
	Type uint64
	Raw  RawInfo
}

An UnknownCapsule is a capsule of a type that connect-ip-go doesn't process.

Jump to

Keyboard shortcuts

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