package
0.5.8
Repository: https://github.com/firefart/stunner.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

AllocateRequest returns an ALLOCATE request.
AllocateRequestAuth returns an authenticated ALLOCATE request.
No description provided by the author
BindingRequest returns a request for the BINDING method.
ChannelBindRequest returns a CHANNEL BIND request.
No description provided by the author
ConnectionBindRequest creates a CONNECTION BIND request.
ConnectRequest returns a CONNECT request.
ConnectRequestAuth returns an authorized CONNECT request.
No description provided by the author
CreatePermissionRequest returns a CREATE PERMISSION request.
ExtractChannelData extracts the channel and length from a UDP data packet.
No description provided by the author
No description provided by the author
Padding handles the padding required for STUN packets.
ParseError returns an Error type from a byte slice.
No description provided by the author
RefreshRequest returns a REFRESH request.
No description provided by the author
No description provided by the author
SendRequest returns a SEND request.
SetupTurnConnection executes the following: Allocate Unauth (to get realm and nonce) Allocate Auth CreatePermission it returns the connection, the realm, the nonce and an error.
SetupTurnTCPConnection executes the following: Allocate Unauth (to get realm and nonce) Allocate Auth Connect Opens Data Connection ConnectionBind it returns the controlConnection, the dataConnection and an error.

# Constants

only used internally, not part of the spec.
No description provided by the author
No description provided by the author
AttrAlternateServer https://tools.ietf.org/html/rfc5389#section-15.11.
No description provided by the author
old RFC5780 https://www.rfc-editor.org/rfc/rfc5780#section-7.
No description provided by the author
AttrConnectionID https://tools.ietf.org/html/rfc6062#section-6.2.1.
No description provided by the author
No description provided by the author
AttrErrorCode https://tools.ietf.org/html/rfc5389#section-15.6.
No description provided by the author
AttrFingerprint https://tools.ietf.org/html/rfc5389#section-15.5.
No description provided by the author
AttrMappedAddress https://tools.ietf.org/html/rfc5389#section-15.1.
AttrMessageIntegrity https://tools.ietf.org/html/rfc5389#section-15.4.
AttrNonce https://tools.ietf.org/html/rfc5389#section-15.8.
No description provided by the author
No description provided by the author
AttrRealm https://tools.ietf.org/html/rfc5389#section-15.7.
https://datatracker.ietf.org/doc/html/rfc6156#section-10.1.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AttrSoftware https://tools.ietf.org/html/rfc5389#section-15.10.
No description provided by the author
AttrUnknownAttributes https://tools.ietf.org/html/rfc5389#section-15.9.
AttrUsername https://tools.ietf.org/html/rfc5389#section-15.3.
AttrXorMappedAddress https://tools.ietf.org/html/rfc5389#section-15.2.
No description provided by the author
No description provided by the author
https://datatracker.ietf.org/doc/html/rfc6156#section-10.2.
No description provided by the author
No description provided by the author
ErrorBadRequest error Bad Request: The request was malformed.
ErrorConnectionAlreadyExists https://tools.ietf.org/html/rfc6062#section-6.3.
ErrorConnectionTimeoutOrFailure https://tools.ietf.org/html/rfc6062#section-6.3.
No description provided by the author
No description provided by the author
https://datatracker.ietf.org/doc/html/rfc6156#section-10.2.
ErrorServerError error Server Error: The server has suffered a temporary error.
ErrorStaleNonce error Stale Nonce: The NONCE used by the client was no longer valid.
ErrorTryAlternate error Try Alternate: The client should contact an alternate server for this request.
ErrorUnauthorized error Unauthorized: The request did not contain the correct credentials to proceed.
ErrorUnknownAttribute error Unknown Attribute: The server received a STUN packet containing a comprehension-required attribute that it did not understand.
No description provided by the author
No description provided by the author
MsgTypeClassError https://tools.ietf.org/html/rfc5389#section-6.
MsgTypeClassIndication https://tools.ietf.org/html/rfc5389#section-6.
MsgTypeClassRequest https://tools.ietf.org/html/rfc5389#section-6.
MsgTypeClassSuccess https://tools.ietf.org/html/rfc5389#section-6.
No description provided by the author
MsgTypeMethodBinding https://tools.ietf.org/html/rfc5389#section-18.1.
No description provided by the author
MsgTypeMethodConnect https://tools.ietf.org/html/rfc6062#section-6.1.
MsgTypeMethodConnectionAttempt https://tools.ietf.org/html/rfc6062#section-6.1.
MsgTypeMethodConnectionBind https://tools.ietf.org/html/rfc6062#section-6.1.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

MagicCookie is the fixed value according to the rfc.
RequestedTransportTCP represents TCP.
RequestedTransportUDP represents UDP.
nolint:deadcode,varcheck,unused.
No description provided by the author
No description provided by the author

# Structs

Attribute represents a single STUN attribute.
Error holds the Error Attribute 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved, should be 0 |Class| Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reason Phrase (variable) .
Header represents the header of a STUN message.
MessageType represents the message type For example, a Binding request has class=0b00 (request) and method=0b000000000001 (Binding) and is encoded into the first 16 bits as 0x0001.
Stun is the main object.

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
AttributeType defines the type of the attribute.
ErrorCode defines the returned error code.
MessageTypeClass represents the Class.
MessageTypeMethod holds the STUN method.
RequestedTransport represents the requested transport.