Send a file securely via croc relay
Securely transfer a file to any remote machine bypassing NAT using a custom code phrase and the croc relay network.
Setup
- → Install croc (e.g., `brew install croc` or via your system's package manager)
Cost per run
Free
The one-liner
$ croc send --code "super-secret-phrase" ./payload.tar.gzWhat each stage does
- [01] croc
crocInvokes the croc file transfer utility, which uses relay servers to easily bypass NAT and firewalls. - [02] croc
sendInstructs croc to act as the sender in the peer-to-peer transfer. - [03] croc
--code "super-secret-phrase"Defines a custom, pre-shared secret phrase instead of relying on an auto-generated one. - [04] croc
./payload.tar.gzThe target file to be encrypted (using PAKE) and sent across the relay.
Expected output (sample)
Sending 'payload.tar.gz' (14.2 MB) Code is: super-secret-phrase On the other computer run croc super-secret-phrase
Caveats & tips
- Footgun: If the custom code phrase is too simple or easily guessable, a third party could intercept the transfer before the intended recipient connects.
- Permission/Cost: Uses the public croc relay by default; for highly sensitive enterprise data, consider hosting your own private relay server.