In modern network transport research, significant attention is focused on encapsulating L3 packet streams (TUN) inside real-time multimedia relay protocols—specifically STUN / TURN (RFC 5766) and RTP / SRTP (RFC 3550). One of the most technically notable open-source repositories in 2026 is the non-commercial research project CSQTT (github.com/amurcanov/csqtt), written in Rust (2024 Edition) and Kotlin Compose. In this article, we analyze its 72-stream packet dispatcher, Head-of-Line blocking mitigation, and Linux syscall optimizations.
- TURN/RTP Encapsulation: CSQTT establishes a virtual
TUNinterface and encapsulates encrypted L3 packets inside TURN (ChannelBind) and RTP streams resembling WebRTC media relay traffic. - Multi-Stream Aggregation (Up to 72 Sessions): Because individual TURN media channels are typically rate-shaped to ~2.3 Mbps for video calls, the Rust dataplane aggregates up to 72 parallel sessions—achieving 159.92 Mbps symmetrical throughput in Linux E2E tests while consuming only ~18% of a single logical CPU core on the server.
- Class-Aware Round Robin Dispatcher: Segregates packets into
Small(≤164 B),Medium(165–999 B), andBulk(≥1000 B) priority lanes with batchedsendmmsg/recvmmsgkernel I/O. - Strict Non-Commercial License: Distributed under the PolyForm Noncommercial License 1.0.0, strictly prohibiting commercial use or paid service integration.
1. Why TURN and RTP Media Streams Have a Distinct Network Profile
In enterprise networks running WebRTC or VoIP video conferencing behind strict Symmetric NATs, direct peer-to-peer connectivity often fails. The IETF RFC 5766 standard defines TURN (Traversal Using Relays around NAT) to relay real-time media packets over UDP.
After a ChannelBind transaction, TURN frames use a compact 4-byte ChannelData header followed by the encrypted payload. Because real-time audio/video degrades rapidly under packet delay variation (jitter), enterprise QoS policies prioritize UDP media relays while capping per-stream bandwidth to typical HD video bitrates (2–3 Mbps).

Inside the Real CSQTT v2.1.9 Application Interface (by amurcanov)
The CSQTT v2.1.9 mobile client organizes tunnel control and remote server orchestration across six bottom navigation tabs (Connect, Tunnel, Deploy, Split-Exclusions, Logs, Info):
- Connection Screen (
Подкл.): Displays the central glowingCstatus indicator, active session timer, and live profile summary (Masquerading: Medium,Hashes: Auto,Credentials Mode: Auto). - Tunnel & Hashes Tab (
Туннель): Configures the server IP/domain, automatic hash negotiation (Auto API), credential rotation mode (Auto), masquerading profile (Medium), transport layer (UDP), and the concurrency slider (e.g.,27 parallel UDP streams). - SSH & Docker Auto-Deploy Tab (
Деплой): Enables zero-touch self-hosted deployment directly over SSH (rootpassword or SSH keys) with the Install in Docker (Установить в Docker) toggle, one-click server installation, client authorization, and direct access to the Rust Web Panel (Панель). - Live Telemetry Logs Tab (
Логи): Streams real-time cryptographic and TURN state transitions:[OK] Key derived ✓,[OK] Stream ready ✓ (x27),[OK] DNS applied: Cloudflare DNS ✓, and[TURN] ChannelBind active: channel 0x4000 (x27).
2. Inside the CSQTT Rust Dataplane: Class-Aware Round Robin & Syscall Batching
To overcome per-stream bandwidth caps without causing TCP out-of-order packet loss across parallel relays, amurcanov/csqtt implements a deterministic Class-Aware Round Robin scheduler:
| Traffic Class | Packet Types & Payload Size | Stream Chunk | UDP Batch Size | Engineering Purpose |
|---|---|---|---|---|
| Small (Priority) | DNS, ICMP, TCP SYN/FIN/RST/ACK, payloads up to 164 B |
4 packets | 16 | Eliminates latency spikes by preventing small control packets from queuing behind bulk downloads |
| Medium | Interactive web & API frames (165–999 B) | 16 packets | 64 | Balanced multiplexing for standard HTTP/2 and HTTP/3 transactions |
| Bulk | Large data transfers (1000+ B) | 32 packets | 128 | Maximizes kernel syscall efficiency via batched UDP transmission |
By combining sendmmsg / recvmmsg batched socket I/O with burst TUN descriptor writes (up to 64 packets per readiness event), the Rust server dataplane sustains ~160 Mbps across 72 concurrent sessions at just 18% of one vCPU core. It also includes hot-swappable encrypted DNS profiles via live TUNCONF frames and strict cryptographic device_id password binding in SQLite (WAL mode).
Frequently Asked Questions (FAQ)
Can CSQTT code be used in commercial VPN services?
No. CSQTT is licensed under the PolyForm Noncommercial License 1.0.0, which explicitly forbids any commercial distribution, monetization, or paid service integration.
How do enterprise NGFWs detect multi-session TURN tunnels?
While a normal WebRTC call opens 1 to 4 media streams with steady codec bitrates, multi-stream tunnels open dozens of simultaneous ChannelBind sessions from a single client IP and exhibit bursty MTU-sized packet distributions.
- AmneziaWG 3.1 Protocol & Amnezia 5.0.1.5 Architecture Research: WireGuard Header Randomization and Enterprise Tunnel Protection Against DPI Fingerprinting
- WebRTC, TURN, and RTP Media Tunneling Architecture Research: Stream Analysis, Network Dispatchers, and Practical Implementation in CSQTT (Current Article)
- VLESS Protocol & XTLS Reality Architecture: Cryptographic Analysis of TLS 1.3 Handshake, Active Probing Defense, and Zero-Overhead Vision Flow
- Comparative Analysis of Modern Network Transport Protocols (2026): Hysteria 2 (QUIC), TUIC v5, ShadowTLS v3, WireGuard, and OpenVPN DCO in Enterprise Networks
- DPI Traffic Analysis Technologies & TCP/TLS Packet Fragmentation Optimization: Architectural Breakdown of zapret2 v1.0.5.2 (bol-van) and ByeByeDPI (romanvht)
The combination of sendmmsg batching with class-aware scheduling is a robust architectural choice for bypassing per-session traffic policers. Aggregating 72 parallel allocations effectively circumvents carrier-grade NAT shaping while keeping CPU overhead minimal. However, jitter variance across parallel paths will remain the critical bottleneck for high-throughput TCP flows.