QUIC + WebSocket, shared state
CLI clients over QUIC and browser clients over WebSocket land in the same room. Upload from the web, pull from the terminal — it just works.
A lightweight Go binary that moves files and relays multi-user chat over QUIC. Works from the CLI or a browser. No accounts, no cloud — just room codes.
# start the server (web UI + QUIC relay in one process) $ airsend -sw 0.0.0.0 3888 0.0.0.0 8443 → web: http://0.0.0.0:3888 · quic: 0.0.0.0:8443 # send a file, get a code $ airsend -f ./logs.tar.gz → code: wave21 # receive it anywhere $ airsend -r wave21
One binary. Two transports. Zero dependencies at the user’s side — no account, no install step for the receiver if they use the browser.
CLI clients over QUIC and browser clients over WebSocket land in the same room. Upload from the web, pull from the terminal — it just works.
Files are deleted from the server after the first download. Code-based lookup (wave21, dock42). No lingering blobs.
Broadcast rooms by code. CLI TUI or browser — identical semantics.
Token bucket per IP × scope: upload, paste, download, ws. Proxy aware.
Bypass the relay entirely with -d / -ds. Pure peer-to-peer.
Protocol "airsend" over generated certs. Intentional.
Click a step on the right to scrub through the demo.
CLI flags, HTTP API, and the core architecture notes in one place.
| Flag | What it does |
|---|---|
-s <host> <port> | QUIC-only relay server. |
-sw [args] | Web UI (TCP) + QUIC relay. Defaults: web 0.0.0.0:3888, QUIC 0.0.0.0:443. |
-f [code] [host] [port] <file> | Send file(s) through the relay, optional code override. |
-r <code> [host] [port] | Receive a file from the relay by code. |
-d <file> [host[:port]] | Direct peer-to-peer send (no relay). |
-ds <listen-host> <port> | Listen for a direct peer-to-peer send. |
-m [code] [host] [port] | Chat client over the relay. Generates a code if omitted. |
-mr <code> <host> <port> | Chat receiver over the relay. |
| Endpoint | Method | Purpose |
|---|---|---|
/api/upload | POST | Upload a file. Returns a short code. |
/api/paste | POST | Send text or a script body, receive a code for pickup. |
/api/download | GET | Download a file by code. One-shot — deleted after success. |
/ws | WS | Chat room over WebSocket. Same state as CLI chat. |
# QUIC (UDP) protocol "airsend" tls self-signed, skip-verify keepalive 2m idle_timeout 10m # HTTP + WebSocket (TCP) active_in -sw mode only
pendingFiles map[code]FileInfo # one-shot pickup chatRooms map[code]*ChatRoom # broadcast rateLimiter token-bucket per ip # scope-aware
upload # POST /api/upload paste # POST /api/paste download # GET /api/download download_miss # 404 pickups ws # WebSocket chat
DEFAULT_SERVER_HOST airsend.4rji.com DEFAULT_SERVER_PORT 443 FILES_DIR /opt/4rji/airsend LOG ${logDir}/connections.log