Xirsys.XTurn (xturn v2.0.0)

Copy Markdown View Source

XTurn is a STUN/TURN relay server for real-time media (WebRTC, VoIP, and similar).

What problem this solves

Many devices sit behind NAT or firewalls and cannot receive inbound UDP/TCP directly. Interactive Connectivity Establishment (ICE) lets two peers find working paths; when direct paths fail, a TURN relay forwards media through a server the client can reach. STUN discovers reflexive addresses and tests NAT behavior; TURN allocates relay ports, permissions, and channels so peers can exchange packets via the server.

XTurn implements the server side: it listens for STUN/TURN, authenticates clients, opens relay sockets, and forwards media on a fast path separate from control requests. STUN message encoding and decoding use xmedialib (XMediaLib.Stun).

Main modules

RFCs

Summary

Functions

OTP application callback.

Functions

start(type, args)

OTP application callback.

Initialises ETS stores (allocations, channels, permissions, auth, quota, plugins), ensures ListenRegistry, rewrites :listen ports via ListenConfig, and starts RootSupervisor with the resolved listener list.