src/docs/TESTING.md
Send- and receive-side release checks are normally cached for 24 hours. Set
CROC_DO_CHECK=1 to bypass a fresh cache, wait for a release request before the
transfer starts, and report whether a newer release is available:
CROC_DO_CHECK=1 croc send file.txt
The override waits up to two seconds for the request and reports when the current
version is already latest or when the check is unavailable. It does not display
a notice under --quiet or turn update-check failures into errors.
Use three terminals to run a local relay, receiver, and sender. From the repository root, build the binary and start a local relay in the first terminal:
go build -o ./bin/croc && ./bin/croc relay --ports 9009,9010
In the second terminal, start the receiver:
rm -rf croc-big.bin && ./bin/croc --debug --yes --overwrite --relay 127.0.0.1:9009 test-reconnect-code
In the third terminal, start the sender:
./bin/croc --relay 127.0.0.1:9009 --throttleUpload 512K --no-compress send --code test-reconnect-code --no-local --no-multi /tmp/croc-big.bin
While the transfer is running, interrupt one active socket.
For a data-channel drop:
sudo ss -K dst 127.0.0.1 dport = :9010
For a control-channel drop:
sudo ss -K dst 127.0.0.1 dport = :9009
If no connection is killed, inspect the active croc sockets and adjust the port:
sudo ss -tnp | grep croc