Architectural Walkthrough

How Direct P2P Streaming Works

From the moment you drop a massive file into your browser to the final byte written to the recipient's hard drive, here is the exact technical execution pipeline.

1
Phase 01 • Memory Sovereignty

OPFS Stream Slicing & Zero-RAM Buffering

In traditional web applications, selecting a 50GB file causes browser tabs to crash due to RAM exhaustion. Qnestr circumvents this using the HTML5 File System Access API and the Origin Private File System (OPFS).

The file is read via chunked byte streams in 256 KB increments. At no point does Qnestr buffer more than 8 MB of data in RAM at any given millisecond, ensuring your workstation remains perfectly smooth.

const reader = file.stream().getReader(); // Zero memory allocation
2
Phase 02 • Sub-Millisecond Signaling

Durable Objects WebSocket Handshake

To establish a WebRTC connection, peers must exchange Session Description Protocol (SDP) offers and ICE candidates. Instead of maintaining persistent cloud server fleets, Qnestr creates a dedicated Cloudflare Durable Object room instance.

The sender receives a unique 6-digit room code (e.g. QN-4829) or QR code. When the receiver connects, the signaling handshake completes over encrypted WebSockets in under 80 milliseconds, after which the signaling room self-destructs.

3
Phase 03 • Intelligent Resolution

Multi-Transport Automatic Handoff

Once peers acknowledge each other, Qnestr’s transport resolution engine tests candidate network paths simultaneously:

  • • Path A (Local Wi-Fi / LAN): If both devices share a local router, WebRTC establishes host candidates. Data streams locally at full Ethernet/Wi-Fi speed (up to 120+ MB/s) with zero external internet data usage.
  • • Path B (Public WAN WebRTC): If devices are remote, STUN/TURN relays negotiate an encrypted direct peer-to-peer data tunnel across the public internet.
  • • Path C (Zero-Knowledge Cloud Relay): If the receiver is offline or behind an enterprise symmetric NAT firewall, files are client-side encrypted (AES-GCM 256) and temporarily deposited into Cloudflare R2 ($0 egress fees).
4
Phase 04 • Integrity & Verification

Direct Disk Streaming & SHA-256 Checksum

The receiver's browser reconstructs incoming binary chunks into OPFS disk blocks in real time. Upon receiving the final chunk, Qnestr's client-side integrity verifier computes the rolling SHA-256 cryptographic hash.

If the computed hash matches the sender's manifest bit-for-bit, the browser prompts the native file save dialogue. Zero corruption, zero truncation, 100% mathematical integrity.

Frequently Asked Technical Questions

Everything you need to know about NATs, firewalls, and network performance.

What happens if both devices are behind strict corporate firewalls?

In corporate networks with Symmetric NATs that block direct UDP packets, Qnestr automatically falls back to secure WebRTC TURN relays or our client-side encrypted Cloudflare R2 temporary hosted relay. Your transfer never fails.

Do sender and receiver need to keep their browsers open?

For direct P2P transfers, yes—because data beams straight between your devices without server storage, both devices must be online simultaneously. If one party needs to disconnect, simply select our Cloud Host option to encrypt and upload the package for asynchronous retrieval.

Is there any file size limit for P2P transfers?

No. Because Qnestr uses OPFS stream chunking and direct SCTP DataChannels, there are zero artificial file size limitations. Users routinely transfer 100GB+ archives and raw 4K video drives.