22 releases (breaking)

new 0.20.0 Dec 4, 2024
0.19.0 Nov 5, 2024
0.18.0 Oct 21, 2024
0.12.0 Jul 22, 2024
0.2.2 Dec 21, 2023

#165 in Network programming

Download history 136/week @ 2024-08-16 31/week @ 2024-08-23 176/week @ 2024-08-30 32/week @ 2024-09-06 210/week @ 2024-09-13 61/week @ 2024-09-20 235/week @ 2024-09-27 43/week @ 2024-10-04 14/week @ 2024-10-11 174/week @ 2024-10-18 33/week @ 2024-10-25 144/week @ 2024-11-01 34/week @ 2024-11-08 12/week @ 2024-11-15 6/week @ 2024-11-22 74/week @ 2024-11-29

153 downloads per month

Apache-2.0 OR MIT

48KB
694 lines

Sendme

This is an example to use iroh-bytes and iroh-net to send files and directories over the internet.

It is also useful as a standalone tool for quick copy jobs.

Iroh-net will take case of hole punching and NAT traversal whenever possible, and fall back to a relay if hole punching does not succeed.

Iroh-bytes will take care of blake3 verified streaming, including resuming interrupted downloads.

Sendme works with 256 bit node ids and therefore location transparent. A ticket will remain valid if the IP address changes. Connections are encrypted using TLS.

Installation

cargo install sendme

Usage

Send side

sendme send <file or directory>

This will create a temporary iroh node that serves the content in the given file or directory. It will output a ticket that can be used to get the data.

The provider will run until it is terminated using Control-C. On termination it will delete the temporary directory.

This currently will create a temporary directory in the current directory. In the future this won't be needed anymore.

Receive side

sendme receive <ticket>

This will download the data and create a file or directory named like the source in the current directory.

It will create a temporary directory in the current directory, download the data (single file or directory), and only then move these files to the target directory.

On completion it will delete the temp directory.

All temp directories start with .sendme-.

Dependencies

~52–89MB
~1.5M SLoC