Overview
These types and functions are deprecated. Use the pion/stun package directly instead.
The Pion ICE library provides type aliases for STUN and TURN URI parsing from the pion/stun/v3 package. These are maintained for backward compatibility.
Type Aliases
URL
Deprecated: Use stun.URI from github.com/pion/stun/v3 instead.
Represents a STUN (RFC 7064) or TURN (RFC 7065) URI.
SchemeType
Deprecated: Use stun.SchemeType from github.com/pion/stun/v3 instead.
Indicates the server type (STUN, STUNS, TURN, TURNS).
ProtoType
Deprecated: Use stun.ProtoType from github.com/pion/stun/v3 instead.
Indicates the transport protocol (UDP, TCP).
Constants
Scheme Types
Protocol Types
Unknown
Represents an unknown ProtoType or SchemeType.
Functions
ParseURL
Deprecated: Use stun.ParseURI from github.com/pion/stun/v3 instead.
Parses a STUN or TURN URL following the ABNF syntax described in RFC 7064 and RFC 7065.
Signature:
NewSchemeType
Deprecated: Use stun.NewSchemeType from github.com/pion/stun/v3 instead.
Creates a new SchemeType from a raw string.
Signature:
NewProtoType
Deprecated: Use stun.NewProtoType from github.com/pion/stun/v3 instead.
Creates a new ProtoType from a raw string.
Signature:
Usage Examples
STUN URI
Examples:
stun:stun.example.com
stun:stun.example.com:3478
stuns:stun.example.com:5349
TURN URI
Examples:
turn:turn.example.com:3478
turn:turn.example.com:3478?transport=udp
turn:turn.example.com:3478?transport=tcp
turns:turn.example.com:5349?transport=tcp
Default Ports
URI Structure
The stun.URI type has the following structure:
Migration Guide
External References