meew0 / namida

Fast file transfer over high-latency connections (Tsunami UDP but modernised)
Other
4 stars 1 forks source link

namida

waves become tears

namida is a tool for fast file downloads over high-latency and/or unreliable networks. It uses UDP for bulk data transmission, together with a minimal TCP control stream to mediate retransmission of lost data.

namida is based upon Tsunami, a 2000s-era protocol and software suite for UDP-based file transmission. While Tsunami is still usable today, it has essentially not been updated since 2009, and has several problems that make it annoying to use nowadays. So, I created namida by first converting Tsunami's source code to Rust using C2Rust, manually converting the generated unsafe code to safe, more idiomatic Rust, and then making various improvements.

In the process I also removed some parts of Tsunami. In particular, after 2006 Tsunami was primarily maintained by Finnish VLBI scientists (primarily Jan Wagner at Metsähovi Radio Observatory), who added support for VLBI-specific real-time networking hardware. I do not have access to any of this hardware, so I would not be able to port these parts even if I wanted to, and presumably the VLBI people are either still happily using Tsunami or have their own updated tools anyway. (If you know which one it is, let me know, I am curious!)

Features

New features compared to Tsunami:

While namida is based on software that has been used in production for 20 years, there are still many parts I'm unhappy with. Also, my “improvements” might have introduced new bugs. Expect more updates in the future.

Usage

For now, clone the repo and build it using cargo build --release. The same executable is used for the client and the server.

Run a namida server providing all files in the local directory:

$ namida serve

Run a namida server providing only some specific files:

$ namida serve file1.txt file2.txt

List the files a server has available:

$ namida dir --server example.com

Get a specific file from a server:

$ namida get --server example.com file1.txt

Get all files from a server:

$ namida get --server example.com --all

Many more options are available for the individual subcommands. Run namida help [command] to get more information.

Licencing information

namida is available under the same licence as Tsunami (both the original Tsunami from Indiana University, and Jan Wagner's updated version), which is a permissive BSD-style licence with the additional restriction that derivative programs may not be called “Tsunami” without permission from Indiana University. See LICENSE.txt for the full licence text.