dtls

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDTLSSeed

func GetDTLSSeed(ctx context.Context) (*prng.Seed, error)

GetDTLSSeed fetches a seed established by SetDTLSSeed, or nil for no seed as set by SetNoDTLSSeed, or returns an error if no seed is configured specified dial context.

func SetDTLSSeed

func SetDTLSSeed(
	ctx context.Context, baseSeed *prng.Seed, isOffer bool) (context.Context, error)

SetDTLSSeed establishes a cached common/prng seed to be used when randomizing DTLS Hellos.

The seed is attached as a value to the input dial context, yielding the output context. This allows a fork of pion/dtls to fetch the seed, from a context, and apply randomization without having to fork many pion layers to pass in seeds.

Both sides of a WebRTC connection may randomize their Hellos. isOffer allows the same seed to be used, but produce two distinct random streams. The client generates or replays an obfuscation secret used to derive the seed, and the obfuscation secret is relayed to the proxy by the Broker.

func SetNoDTLSSeed

func SetNoDTLSSeed(ctx context.Context) context.Context

SetNoDTLSSeed indicates to skip DTLS randomization for the given dial context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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