About this project

croc is a command-line file-transfer tool designed to let any two computers exchange files and folders simply and securely. According to its README, it combines peer-to-peer transfer with relay fallback, end-to-end encryption based on password-authenticated key agreement (PAKE), cross-platform support (Windows, Linux, macOS, and a browser client), multiple-file transfers, resumable interrupted transfers, and no need for a local server or port forwarding. It is described as IPv6-first with IPv4 fallback and able to work through a proxy such as Tor. Usage centers on a short code phrase. The sender runs `croc send [file(s)-or-folder]`, which prints a code phrase; the receiver runs `croc code-phrase` on another machine. The code phrase drives the PAKE handshake that produces a shared secret key for encryption. On Linux and macOS, the README recommends passing the secret as an environment variable (`CROC_SECRET=*** croc`) to avoid leaking it through the process name, with a `--classic` option to restore default behavior on single-user systems. Beyond basic send/receive, the tool documents many options: custom code phrases, `--overwrite` and `--rename` for handling existing files, `--exclude` and `--exclude-file` for filtering folder contents, piping via stdin/stdout, sending short text with `--text`, sending multiple files or folders, showing a QR code for mobile use, SOCKS5 proxy support, selectable encryption curves, an alternative `imohash` hashing algorithm, clipboard behavior flags, and a quiet mode for scripts. The README also describes `croc ssh`, which shares a persistent terminal session on Linux, macOS, FreeBSD, or OpenBSD. The host issues separate six-word invitations for read/write and read-only participants; the session uses an ephemeral WireGuard path with an ephemeral SSH host key, and remote commands, forwarding, and SFTP are disabled. A separate `croc store` mode uploads client-side encrypted ciphertext for later retrieval, with configurable download limits and expiration, a browser link whose decryption key sits in the URL fragment, and a revoke command. Transport selection defaults to `--transport auto`: after the PAKE handshake, compatible native clients attempt a WireGuard-based path with DERP fallback and NAT traversal, otherwise falling back to croc's relay data ports. Users can self-host a relay with `croc relay` (default TCP ports 9009-9013) or via Docker, optionally with a password. A React/Vite web client, bundled in a separate `croc-web` server, can send and receive files and join `croc ssh` sessions, and is compatible with the CLI. Installation is documented through a shell script, Homebrew, MacPorts, Scoop, Chocolatey, Nix, Alpine, Debian, Arch, Termux, FreeBSD, Conda, Docker, building from source with Go, and community Android and desktop GUI apps. Deployment notes cover Disco, including environment variables, relay ports, and a persistent store volume.