View all files | ||||
hairgap is a set of tools to transfer data over a unidirectional network link (typically a network diode). It uses catid's wirehair (https://github.com/catid/wirehair) librairy for error correction and is written to handle high bandwith transfers (> 200 MB/s).
It is meant to be a mere transport on a dedicated, safe link: no authentication nor encryption is guaranteed, although there is a work in progress on this matter.
This should be considered alpha quality, any bug report will be very welcome.
Before anything, to make high bandwith transfers work properly on a linux machine, you might want to change at least these system options on the receiver side:
and
Or, on newer kernels:
To use, on the receiver side first:
Then, on the sender side:
see hairgap[sr] -h for various options. For very reliable transfers on machines with a fast CPU, I would suggest -N 30000 -r 1.5, which sets a relatively high redundancy (+50% of redundant data) and big redundancy blocks for a better resistance to loss bursts (N=30000).
Note that a static ARP entry for RECEIVER_IP must be provided for hairgaps to work properly. One way to achieve this is as follows:
Compilation has only been tested on linux.
Note: you should either git clone --recursive or git submodules --init --update to retrieve submodules.
Testing properly will require you to set the aforementioned sysctls. Note that the tests can currently deadlock, try to restart them. This is another FIXME. More tests are on their way.
Hairgap implements its own, very simple protocol. Its documentation is on its way too.
See hairgap.h first, it will give you pointers.