Byzo Share
Technical Architecture

How peer-to-peer browser file transfer actually works.

Transparent by design: a tiny stateless WebSocket server introduces browsers, then steps completely out of the way while encrypted WebRTC carries your files.

WebRTC Peer ADTLS 1.2+ Encrypted
DTLS P2P
WebRTC Peer B64KB Backpressure

Encryption

Mandatory DTLS

WebRTC enforces end-to-end DTLS encryption on every DataChannel.

Server Visibility

Zero Bytes

File contents and P2P text messages never pass through the signaling server.

Open Source

byzo.cc

Built by samir.byzo.cc for byzo.cc — inspect or self-host every line.

How to transfer step by step

  1. 01

    1. Ephemeral Discovery & Signaling

    The signaling server hashes your connection's public IP with an ephemeral per-process secret so devices on the same network find each other without logging raw IPs. Manual 6-digit codes create temporary rooms.

  2. 02

    2. ICE / STUN / TURN Handshake

    Browsers exchange SDP offers, answers, and ICE candidates over WebSocket to punch through NAT directly. If a strict firewall blocks direct P2P, an optional TURN server relays encrypted packets.

  3. 03

    3. Chunked Streaming Over RTCDataChannel

    Once accepted, files slice into 64KB ArrayBuffers with bufferedAmount backpressure. The receiver writes straight to disk via File System Access API or a self-hosted Service Worker stream.

Common questions

Does the signaling server ever see my files or clipboard text?

Never. Both files and clipboard text messages travel strictly over the peer-to-peer RTCDataChannel after the WebRTC handshake completes.

Why does nearby discovery group by public IP?

Browsers cannot scan local LAN subnets for security reasons. Grouping by the hashed public IP seen at the edge lets devices behind the same Wi-Fi router discover each other automatically.

What happens if a TURN relay is used?

Even when packets traverse a TURN server, WebRTC DTLS encrypts the payload between the two browsers so the relay only sees opaque ciphertext.