๐Ÿ“– How it works

Request flow

Every request you make to the public URL travels through this path:

Browser
  โ”‚
  โ–ผ  HTTPS
rustunnel-server  (your VPS)
  โ”‚  WebSocket + TLS
  โ–ผ  yamux stream
rustunnel client  (your laptop / dev machine)
  โ”‚  plain TCP
  โ–ผ
this demo server  :3000

Two WebSocket connections

The client maintains two persistent connections to the server:

Control plane
JSON frames
auth ยท registration ยท heartbeat
Data plane
Binary yamux
all proxied connections multiplexed

Protocol frames

Key control frames exchanged at startup:

FrameDirectionPurpose
Authโ†’ serverSend token + client version
AuthOkโ† serverReceive session_id
RegisterTunnelโ†’ serverRequest subdomain / port
TunnelRegisteredโ† serverReceive public URL
NewConnectionโ† serverIncoming request notification
Ping / Pongโ†”Heartbeat (every 30 s)

Reconnection

If the connection drops, the client reconnects automatically with exponential backoff: 1 s โ†’ 2 s โ†’ 4 s โ€ฆ 60 s with ยฑ20% jitter. Auth errors are the only fatal case โ€” everything else retries.

โ† Home Live stats โ†’