src/docs/TESTING.md
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