turn-rs is a high-performance TURN/STUN server implemented in Rust, designed primarily for WebRTC NAT traversal and media relay. The codebase consists of a core library (`turn-server`) and a companion SDK crate (`turn-server-sdk`) that provides a gRPC client and hooks API. The server architecture is async I/O driven (Tokio) with optional transport modules for UDP and TCP (including TLS via rustls). Protocol handling is implemented from scratch with a STUN/TURN message codec, a connection-less switch mechanism for relaying packets between sessions, and a memory pool for zero-copy buffering. Management and observability are exposed through an optional gRPC API (sessions, statistics, destroy) and a Prometheus metrics endpoint. Authentication supports static credentials, TURN REST shared-secret, and an external gRPC hook service for dynamic password lookup and event callbacks. The project is well-tested with unit tests, property-based fuzzing (proptest), integration tests using coturn's test client, and benchmarks. It is actively maintained with recent releases and comprehensive documentation.
NATMap is a command-line tool written in C that establishes TCP/UDP port mappings from an ISP NAT public address to a local private address. It uses STUN protocol to discover the mapped public address and maintain NAT bindings through keep-alive sessions. The architecture is built on a cooperative task-based concurrency model (hev-task-system) for efficient non-blocking I/O. It supports two modes: bind mode, where the tool keeps the port alive and notifies the user via a script, and forward mode, where it listens on the mapped port and forwards traffic to an internal target. The codebase is modular, with clear separation of concerns: configuration parsing, socket creation, STUN protocol handling, NAT session keepers (TCP/UDP), port forwarding servers, and script execution. It is highly portable, with cross-compilation support for Linux, Windows, macOS, FreeBSD, and Android across many architectures.
NatTypeTester is a cross-platform NAT type testing tool that implements STUN protocols (RFC 3489 and RFC 5780) to determine network characteristics. The application provides desktop (Avalonia), Android, and command-line interfaces for testing NAT type, mapping behavior, filtering behavior, and public endpoint detection. It follows a clean layered architecture with MVVM pattern, dependency injection, and separation of concerns. The core STUN protocol implementation is packaged as a reusable NuGet library (Stun.Net) that supports UDP, TCP, TLS, and DTLS transports with SOCKS5 proxy capabilities.
SIPSorcery is a comprehensive real-time communications library for .NET implementing SIP, WebRTC, RTP/RTCP, STUN/TURN/ICE, DTLS-SRTP, and SCTP protocols from scratch. The core library (src/SIPSorcery) provides SIPTransport for signaling, RTCPeerConnection for WebRTC, RTPSession for media transport, and media endpoint abstractions (IAudioSink, IVideoSource) for decoupling capture and rendering. Satellite projects include SIPSorceryMedia.Abstractions (media interfaces), SIPSorceryMedia.FFmpeg and SIPSorceryMedia.Windows (codec backends), SIPSorcery.VP8 (a C# port of libvpx VP8), SIPSorcery.OpenAI.Realtime (OpenAI Realtime API client), and a CLI tool (SIPSorcery.Cli) with route/bridge commands for wiring media pipelines between SIP, WebRTC, and cloud realtime endpoints.
MicroLink v2 is a production-ready Tailscale VPN client for ESP32-S3 devices that establishes secure WireGuard tunnels through Tailscale's control plane. It implements the full Tailscale protocol stack including Noise protocol for control plane encryption, HTTP/2 framing, DISCO peer discovery, STUN for NAT traversal, DERP relay fallback, and WireGuard encryption via wireguard-lwip integration. The architecture uses a multi-task FreeRTOS design with separate tasks for coordination, WireGuard management, DERP transmission, network I/O, and application logic, communicating via message queues and event groups. Key features include WiFi/cellular network failover with health monitoring, zero-copy WireGuard receive option for high-throughput scenarios, NVS-based peer caching with LRU eviction, and an HTTP configuration server for runtime management. The code demonstrates strong protocol fidelity through direct reference to Tailscale's Go source files while adapting to embedded constraints.