IKDAO STUN & TURN Service

peer.ikdao.org Free • Open • Indie • Privacy‑First

What are STUN & TURN?

STUN (Session Traversal Utilities for NAT) is a simple protocol that lets a client discover its public IP address and the type of NAT (Network Address Translator) it sits behind. It is defined in RFC 5389.

TURN (Traversal Using Relays around NAT) is a more robust fallback. When direct peer‑to‑peer (P2P) connections fail, TURN relays the media traffic through a server, guaranteeing connectivity. TURN is defined in RFC 5766.

Why use them?


How IKDAO STUN & TURN fits the privacy promise


Using STUN & TURN in a Web Application

When you create a WebRTC RTCPeerConnection, you supply a list of ICE (Interactive Connectivity Establishment) servers. IKDAO provides both:

// JavaScript example
const iceServers = [
  { urls: 'stun:peer.ikdao.org:3478' },               // STUN
  {
    urls: 'turns:peer.ikdao.org:5349',                // TURN over TLS
    username: 'exampleUser',
    credential: 'examplePass'
  }
];

const pc = new RTCPeerConnection({ iceServers });

Typical use‑cases:

When will TURN be used?

ICE runs a series of connectivity checks. If all direct candidates (host, server‑reflexive via STUN, relayed via TURN) fail, the TURN relayed candidate wins and all media is sent through the TURN server.


Availability & Global Reach

IKDAO runs a geographically‑distributed set of TURN relays, reachable from any internet‑connected device 24/7. The service works over both UDP (fastest) and TCP/TLS (fallback for restrictive networks), ensuring you can connect “anywhere, anytime”.


Specification Quick‑Reference

ProtocolSpec (RFC)Port(s)Typical Use
STUN53893478 (UDP/TCP), 5349 (TLS)Discover public IP & NAT type
TURN57663478 (UDP/TCP), 5349 (TLS)Relay media when direct path fails