WebRTC ======= This section covers the core components that enable WebRTC (Web Real-Time Communication) to establish peer-to-peer connectivity, particularly across NAT/firewall environments. .. toctree:: :maxdepth: 1 :hidden: :includehidden: WebRTC/ICE WebRTC/STUN_SERVER WebRTC/TURN_SERVER .. list-table:: :widths: 20 60 20 :header-rows: 1 * - Component - Description - Use Case * - ICE (Interactive Connectivity Establishment) - Framework that tries multiple methods to connect peers. *Combines STUN and TURN for NAT traversal.* - Establishing peer-to-peer connections. * - STUN (Session Traversal Utilities for NAT) - Helps clients discover their public IP and NAT type. *Enables direct peer-to-peer communication.* - Enables connections behind NAT/firewalls. * - TURN (Traversal Using Relays around NAT) - Relays media when direct connection fails. *Acts as a media proxy server.* - Ensures reliable communication fallback. .. tab-set:: .. tab-item:: ICE (Interactive Connectivity Establishment) **RFC:** RFC 8445 **Main Features:** - Connectivity framework for NAT/firewall traversal - Uses STUN and TURN as fallback mechanisms - Collects multiple candidates (IP addresses and ports) **Use Cases:** - Peer-to-peer connection setup in WebRTC - Negotiating the best path between peers **Alternative Protocols:** - None – ICE is the standard coordination mechanism for WebRTC .. panels:: :container: container pb-4 :column: col-lg-12 p-2 **Let us learn more about ICE:** * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`ICE Version&RFC Details ` * :ref:`ICE Basic Setup on Ubuntu using IPv4 ` * :ref:`ICE Basic Setup on Ubuntu using IPv6 ` * :ref:`ICE Protocol Packet Details ` * :ref:`ICE Usecases ` * :ref:`ICE Basic Features ` * :ref:`ICE Feature : Candidate Gathering ` * :ref:`ICE Feature : Candidate Prioritization ` * :ref:`ICE Feature : Candidate Pairing ` * :ref:`ICE Feature : Connectivity Checks ` * :ref:`ICE Feature : Nomination ` * :ref:`ICE Feature : NAT Traversal ` * :ref:`ICE Feature : STUN Integration ` * :ref:`ICE Feature : TURN Integration ` * :ref:`ICE Feature : Consent Freshness ` * :ref:`ICE Feature : Trickle ICE Support ` * :ref:`Reference links ` .. button-link:: ./WebRTC_ICE.html :color: primary :shadow: :expand: Jump to "ICE" .. tab-set:: .. tab-item:: STUN (Session Traversal Utilities for NAT) **RFC:** RFC 5389 **Main Features:** - Discovers public IP addresses of clients - Identifies NAT type and firewall behavior - Lightweight UDP-based protocol **Use Cases:** - Peer discovery in WebRTC - Assisting direct P2P media path setup **Alternative Protocols:** - TURN – Used when STUN fails .. panels:: :container: container pb-4 :column: col-lg-12 p-2 **Let us learn more about STUN:** * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`STUN_SERVER Version&RFC Details ` * :ref:`STUN_SERVER Basic Setup on Ubuntu using IPv4 ` * :ref:`STUN_SERVER Basic Setup on Ubuntu using IPv6 ` * :ref:`STUN_SERVER Protocol Packet Details ` * :ref:`STUN_SERVER Usecases ` * :ref:`STUN_SERVER Basic Features ` * :ref:`STUN_SERVER Feature : Public IP Discovery ` * :ref:`STUN_SERVER Feature : NAT Type Detection ` * :ref:`STUN_SERVER Feature : Port Mapping Discovery ` * :ref:`STUN_SERVER Feature : Lightweight Protocol ` * :ref:`STUN_SERVER Feature : Client-Server Architecture ` * :ref:`STUN_SERVER Feature : Support for IPv4 and IPv6 ` * :ref:`STUN_SERVER Feature : Used in WebRTC and VoIP ` * :ref:`Reference links ` .. button-link:: ./WebRTC_STUN.html :color: primary :shadow: :expand: Jump to "STUN" .. tab-set:: .. tab-item:: TURN (Traversal Using Relays around NAT) **RFC:** RFC 8656 **Main Features:** - Relays media through an intermediate server - Used when direct peer connection is not possible - Supports TCP and UDP relaying **Use Cases:** - WebRTC calls behind symmetric NAT or strict firewalls - Reliable fallback for P2P media delivery **Alternative Protocols:** - STUN – Preferred when NAT allows direct access .. panels:: :container: container pb-4 :column: col-lg-12 p-2 **Let us learn more about TURN:** * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`TURN_SERVER Version&RFC Details ` * :ref:`TURN_SERVER Basic Setup on Ubuntu using IPv4 ` * :ref:`TURN_SERVER Basic Setup on Ubuntu using IPv6 ` * :ref:`TURN_SERVER Protocol Packet Details ` * :ref:`TURN_SERVER Usecases ` * :ref:`TURN_SERVER Basic Features ` * :ref:`TURN_SERVER Feature : NAT Traversal ` * :ref:`TURN_SERVER Feature : Relay Allocation ` * :ref:`TURN_SERVER Feature : Transport Protocol Support ` * :ref:`TURN_SERVER Feature : Authentication ` * :ref:`TURN_SERVER Feature : Permission Management ` * :ref:`TURN_SERVER Feature : Channel Binding ` * :ref:`TURN_SERVER Feature : IPv4 and IPv6 Support ` * :ref:`TURN_SERVER Feature : ICE Integration ` * :ref:`TURN_SERVER Feature : Secure Media Relay ` * :ref:`TURN_SERVER Feature : Resource Management ` * :ref:`Reference links ` .. button-link:: ./WebRTC_TURN.html :color: primary :shadow: :expand: Jump to "TURN"