TL;DR
# Terminal A - receive into ./downloads
# Terminal B - auto-discover the receiver and send
No IPs, no pairing, no setup. The receiver announces itself over mDNS, the sender picks it from a list (or sends straight to the only one), both sides print the same trust code, and the file lands verified and encrypted.
Why RustDrop
| LAN-only by design | TCP sockets stay on your subnet. There is no server, no relay, no phone-home. |
| Encrypted end-to-end | Ephemeral X25519 → HKDF-SHA256 → ChaCha20-Poly1305, with optional passphrase hardening. |
| Trust codes | An 8-character short-authentication-string appears on both sides - compare it, kill the connection if it differs. MITM detection without a CA. |
| Zero configuration | mDNS discovery (_rustdrop._tcp). Works the moment both machines are on the same network. |
| Actually fast | ~400 MiB/s measured on real hardware (see Performance). Fully pipelined, tokio-powered, zero-copy chunking. |
| Pretty | Multi-progress bars per file + overall, per-chunk rate, ETA, trust-code prompts. |
| Scriptable | --json summaries, --quiet, --yes, --dry-run, shell completions. |
| One static binary | Single static file, no runtime deps, 3.5 MB, ships on Linux (glibc/musl), macOS (Intel/ARM), Windows and Android (Termux). |
Install
Homebrew
Cargo
cargo-binstall (prebuilt, no compilation)
Prebuilt binaries
Grab the archive for your OS from the releases page, or:
# static Linux binary (works on any distro, incl. Alpine & WSL)
VER=
&&
| Target | |
|---|---|
x86_64-unknown-linux-gnu |
most distros |
x86_64-unknown-linux-musl |
fully static, no libc needed |
aarch64-unknown-linux-gnu |
Raspberry Pi 64-bit, ARM servers |
x86_64-apple-darwin, aarch64-apple-darwin |
macOS Intel / Apple Silicon |
x86_64-pc-windows-msvc |
Windows 10+ |
aarch64-linux-android, armv7-linux-androideabi |
Android, via Termux |
Android (Termux)
Grab the Android archive from the
releases page
(aarch64-linux-android for most phones, armv7-linux-androideabi for old
32-bit devices) and unpack it inside Termux:
# phone -> PC in one line
Everything else works the same as on the desktop - discovery, trust codes,
--resume, --json.
From source
Usage
1. Receive, then send (zero config)
# Terminal A
# Terminal B
Add --yes to the receiver to skip the per-transfer confirmation prompt, and
--keep-open to accept several senders in a row without restarting it.
2. Connect directly (skip discovery)
Handy when mDNS is blocked (some guest Wi-Fi, VLANs). Both sides can pin a
port with --port 9000 / --listen 0.0.0.0.
3. Pin the peer with a trust code
# Terminal A
# Terminal B - fails loudly if the codes don't match
The code is derived from the ephemeral session keys, so a relay in the middle would show a different one. Compare it out of band (read it across the room, ping it on Signal) and you have MITM detection with no PKI.
4. Passphrase hardening
# or: export RUSTDROP_PASSPHRASE='s3same-phrase' on both sides
The passphrase is mixed into the HKDF key schedule - an attacker who recorded the whole session still cannot decrypt it offline.
5. Squeeze the pipe
# cap at ~24 MiB/s, skip logs & node_modules, preview first
6. Resume an interrupted transfer
# receiver: pick up where the *.rustdrop-part file left off
Half-finished *.rustdrop-part files are verified and continued: the sender
skips the bytes already on disk while BLAKE3 still covers the whole file. A
leftover that cannot belong to the file simply restarts that one file.
7. Keep a directory in sync
# receiver stays up; sender polls and pushes only what changed
Every poll is a fresh session containing only new or modified files
(deletions are never mirrored). Add --watch --json to get one JSON line per
session.
8. Pair by QR code
|
Scan the code with a phone and pass the same string via -p on both sides -
offline pairing with no typing errors and no cloud in between.
9. Scripting & CI
|
10. Shell completions
How it works
sequenceDiagram
autonumber
participant S as sender
participant R as receiver
Note over S,R: 1. Discovery - mDNS announce / browse (_rustdrop._tcp)
S->>R: Hello (name, ephemeral X25519 pubkey)
R-->>S: HelloAck (name, ephemeral X25519 pubkey)
Note over S,R: 2. Trust - both sides print the same SAS code (e.g. 7GKM-2XQ4)
S->>R: Manifest (encrypted: file tree, sizes, BLAKE3 hashes)
R-->>S: Ready | Abort (rejected by policy / user / trust mismatch)
loop 3. Transfer - per-chunk AEAD, pipelined
S->>R: DataFrame (ChaCha20-Poly1305, seq-numbered nonce)
R-->>S: Ack
end
Note over R: 4. Verify BLAKE3 → atomic rename → restore mtime & permissions
flowchart LR
A["ephemeral<br/>X25519 keypair"] -->|ECDH shared secret| B["HKDF-SHA256<br/>+ optional passphrase"]
B --> C["manifest key"]
B --> D["data key"]
B --> E["ack key"]
B --> F["SAS / trust code"]
C & D & E --> G["ChaCha20-Poly1305<br/>prefix MANI / SD01 / RD01<br/>+ 64-bit sequence nonce"]
G --> H["streamed over TCP<br/>length-prefixed frames"]
Everything is negotiated per session: keys are ephemeral, nonces never repeat
inside a session, and each file is verified against the BLAKE3 hash shipped in
the (encrypted) manifest before it is renamed into place. Partial downloads
live in *.rustdrop-part files and are never mistaken for finished data.
Security model
Protects against
- Passive LAN eavesdroppers - the payload is AEAD-encrypted, no plaintext on the wire.
- Active man-in-the-middle - defeated by comparing the trust code (
--trustpins it). - Offline brute-force of a captured session - a strong
--passphraseraises the HKDF cost floor. - Tampered chunks - Poly1305 tags + end-to-end BLAKE3 hashes.
- Half-written files - verify-then-rename, so a crashed transfer never poisons a directory.
Out of scope
- A compromised endpoint (both ends must be trusted).
- Traffic analysis (peers can see that a transfer happened, and how large it was - sizes are in the manifest).
- Filesystem-level access control on the receiving host.
No analytics, no update checks, no DNS lookups, no persistence outside the
transfer directory. strace it - the only sockets it opens are the mDNS
multicast group and your transfer.
Performance
Measured on this machine over a gigabit-class link (loopback/LAN, single file, 500 MiB):
| Scenario | Throughput |
|---|---|
| Plain send, 500 MiB | 404 MiB/s |
| mDNS auto-discovery + plain send, 500 MiB | 404 MiB/s |
--compress --limit 24M, 46 MiB mixed tree |
55 MiB/s (capped by design) |
Numbers vary with disk speed and NIC. RustDrop pipelines read → encrypt →
write with bounded memory (--chunk-size, default 64 KiB), so throughput does
not collapse on huge files.
Command reference
rustdrop send
| Flag | Description |
|---|---|
<PATH>... |
Files and/or directories to send |
-t, --to <ADDR> |
Connect straight to ip:port (skips mDNS) |
--no-mdns |
Ignore mDNS entirely (requires --to) |
-n, --name <PATTERN> |
Only consider receivers whose name contains PATTERN |
-p, --passphrase <PASS> |
Shared passphrase (env: RUSTDROP_PASSPHRASE) |
--trust <CODE> |
Abort unless the peer displays this trust code |
--discovery-timeout <SECS> |
Seconds to keep browsing for receivers (default: 3) |
--retries <N> |
Extra connection attempts after the first failure (default: 2) |
--chunk-size <BYTES> |
Plaintext chunk size (default: 65536, max 1 MiB) |
--compress |
Deflate chunks when that actually shrinks them |
--limit <RATE> |
Cap the send rate, e.g. 10M, 512K, 1.5M |
--exclude <GLOB> |
Skip files matching GLOB (repeatable) |
--watch |
Poll the inputs and re-send new/changed files (receiver: --keep-open) |
--interval <SECS> |
Seconds between watch-mode polls (default: 2, requires --watch) |
--dry-run |
Show what would be sent, then exit |
--json |
Machine-readable summary on stdout |
-q, --quiet / -v, --verbose |
Less / more output |
rustdrop receive
| Flag | Description |
|---|---|
-o, --out <DIR> |
Destination directory (default: .) |
--listen <IP> |
Local address to bind (default: all interfaces) |
--port <PORT> |
TCP port to listen on (default: 0 = pick one and announce) |
-p, --passphrase <PASS> |
Shared passphrase (env: RUSTDROP_PASSPHRASE) |
--trust <CODE> |
Only accept senders presenting this trust code |
-y, --yes |
Accept every transfer without asking |
--keep-open |
Keep listening for more senders after each transfer |
--no-clobber |
Refuse files that already exist |
--resume |
Continue *.rustdrop-part files from an interrupted transfer |
--no-preserve-time |
Do not restore modification times |
--no-mdns |
Skip mDNS announcement |
--timeout <SECS> |
Wait for a sender (idle timeout with --keep-open, 0 = forever, default: 600) |
--json |
Machine-readable summary on stdout |
rustdrop pair
| Flag | Description |
|---|---|
--show <TEXT> |
Encode this text into the QR instead of generating a passphrase |
--json |
Emit the pairing code as JSON on stdout |
rustdrop list
Global flags
-v/--verbose, -q/--quiet, -h/--help, -V/--version work everywhere.
Comparison
| RustDrop | scp / rsync |
cloud drive | chat app | |
|---|---|---|---|---|
| Works with no internet | ✅ | ✅ | ❌ | ❌ |
| Zero-config peer discovery | ✅ mDNS | ❌ manual | - | ❌ |
| MITM check without a CA | ✅ trust code | host keys | - | ❌ |
| No account | ✅ | ✅ | ❌ | ❌ |
| Single static binary | ✅ | ❌ | - | ❌ |
| Rate limiting + compression | ✅ | partial | - | ❌ |
Development
# regenerate the demo recording
The end-to-end suite starts real TCP listeners on 127.0.0.1, so it catches
handshake, ordering, and teardown regressions that unit tests miss.
Contributions welcome - open an issue first for anything larger than a fix.
Roadmap
- mDNS discovery, trust codes, passphrase hardening
- Compression, rate limiting, excludes, resume-safe temp files
-
--json, completions, keep-open mode, dry-run - Chunk-level resume across sessions (
--resume) - Directory sync mode (
--watch) - QR-code pairing for passphrase bootstrap
- Android binaries for Termux
- iOS companion app (needs macOS/Xcode, tracked in issues)
License
MIT - see LICENSE.