testutils

package
v0.0.0-...-3fa2c4e Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package testutils contains utilities for simulating packet injection and man-in-the-middle (MITM) attacker tests. It is not supposed to be used for non-testing purposes. The API is not guaranteed to be stable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeInitialPacket

func ComposeInitialPacket(
	srcConnID, destConnID, key protocol.ConnectionID,
	frames []wire.Frame,
	sentBy protocol.Perspective,
	version protocol.Version,
) []byte

ComposeInitialPacket returns an Initial packet encrypted under key (the original destination connection ID) containing specified frames.

func ComposeRetryPacket

func ComposeRetryPacket(
	srcConnID protocol.ConnectionID,
	destConnID protocol.ConnectionID,
	origDestConnID protocol.ConnectionID,
	token []byte,
	version protocol.Version,
) []byte

ComposeRetryPacket returns a new raw Retry Packet

Types

type AckFrame

type AckFrame = wire.AckFrame

type ConnectionCloseFrame

type ConnectionCloseFrame = wire.ConnectionCloseFrame

type CryptoFrame

type CryptoFrame = wire.CryptoFrame

type DataBlockedFrame

type DataBlockedFrame = wire.DataBlockedFrame

type Frame

type Frame = wire.Frame

type HandshakeDoneFrame

type HandshakeDoneFrame = wire.HandshakeDoneFrame

type MaxDataFrame

type MaxDataFrame = wire.MaxDataFrame

type MaxStreamDataFrame

type MaxStreamDataFrame = wire.MaxStreamDataFrame

type MaxStreamsFrame

type MaxStreamsFrame = wire.MaxStreamsFrame

type NewConnectionIDFrame

type NewConnectionIDFrame = wire.NewConnectionIDFrame

type NewTokenFrame

type NewTokenFrame = wire.NewTokenFrame

type PathChallengeFrame

type PathChallengeFrame = wire.PathChallengeFrame

type PathResponseFrame

type PathResponseFrame = wire.PathResponseFrame

type PingFrame

type PingFrame = wire.PingFrame

type ResetStreamFrame

type ResetStreamFrame = wire.ResetStreamFrame

type RetireConnectionIDFrame

type RetireConnectionIDFrame = wire.RetireConnectionIDFrame

type StopSendingFrame

type StopSendingFrame = wire.StopSendingFrame

type StreamDataBlockedFrame

type StreamDataBlockedFrame = wire.StreamDataBlockedFrame

type StreamFrame

type StreamFrame = wire.StreamFrame

type StreamsBlockedFrame

type StreamsBlockedFrame = wire.StreamsBlockedFrame

Jump to

Keyboard shortcuts

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