Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

namida: init at 0.5 #346285

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

namida: init at 0.5 #346285

wants to merge 2 commits into from

Conversation

jebriggsy
Copy link

namida

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, namida was created 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 some parts of Tsunami were removed. 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. The project does not have access to this hardware so the features were deprecated

Features

  • Dynamic UDP transfer rate adjustment to avoid overloading the client (it may still use all the available bandwidth, leaving none for other applications. It is highly recommended to use the --rate command to limit the transfer rate to a suitable value)
  • Optional lossy transfer mode: if some amount of data loss can be tolerated, namida can be configured to allow packets to be dropped, with an optional limit. By default, transfers are always lossless.

New features compared to Tsunami:

  • Simple CLI that allows everything to be done in one command invocation (in return, Tsunami's FTP-like interactive console has been removed)
  • Client-side NAT traversal: UDP packets can be received even if the client is behind NAT, without any additional manual configuration required.
  • Encrypted communication by default: snow is used to encrypt both TCP and UDP communication.
  • Resumption of interrupted transfers: if parts of a file to be downloaded are already present locally, those parts will be skipped by default

Usage

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.

Licensing information

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

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants