repobenchmarks // peer-to-peer cli
CLI TOOLS
$ croc send archive.tar.gz

croc Secure File Transfer

A cross-platform file transfer tool that moves files between any two machines through firewalls using end-to-end encrypted code phrases.

Encryption: PAKE (PAKE2 / Curve25519) NAT Traversal: Direct P2P or Encrypted Relay Stars: >26,000
Sender croc send file.zip code: 7-jupiter-blue Receiver croc 7-jupiter-blue E2E Decrypted

Sending a file between two computers often involves frustrating obstacles: setting up temporary SSH access, dealing with NAT router port forwarding, or uploading confidential files to third-party cloud storage like Google Drive or WeTransfer. croc (created by Zack Scholl) makes peer-to-peer file transfer as simple as typing one memorable code phrase, complete with end-to-end encryption and automatic resume capability.

Why Developers Rely on croc

  • Password Authenticated Key Exchange (PAKE): Generates a random cryptographic keypair using a short memorable passphrase. The relay server facilitates the initial handshake but cannot decrypt the data payload.
  • Direct LAN P2P Acceleration: If both computers are on the same local Wi-Fi or wired network, croc automatically switches to direct local socket streaming for gigabit-speed transfers.
  • Resumes Interrupted Transfers: If Wi-Fi drops halfway through a 20GB database dump transfer, running the command again picks up right where it left off.

croc PAKE Handshake & Tunnel Architecture

croc End-to-End Encryption Flow Shows PAKE code exchange, rendezvous through public/private relay, and direct encrypted transfer between peers. croc send file.iso Derives PAKE key croc Relay Server Facilitates NAT Traversal Zero Knowledge of Payload croc <code-phrase> Decrypted on Disk

croc vs Traditional File Transfer Methods

Feature croc scp / rsync Magic Wormhole
Firewall / NAT Traversal Automatic (Relay fallback) Requires open inbound SSH port Automatic
Transfer Resume Built-in automatic resume Supported via rsync flags No (Restarts from zero)
Cross-Platform Speed Fast (Compiled Go binary) Fast (C binary) Moderate (Python implementation)
⚠ Private Relay Gotcha: Custom Relay Server

By default, croc connects through a free public relay server maintained by the developer. While the data payload is end-to-end encrypted, enterprise environments or homelab users transferring sensitive files can self-host their own private relay using: croc relay. Point your clients to your private relay using croc --relay "myrelay.domain.com:9009" send <file>.

Learn more at the official croc GitHub repository.