Sneakernet

Building apps with sneakernet

Application software for sneakernet can be easily written in any programming language.

Application names

Each application should assign itself an application name using reverse domain name notation, such as the built-in apps org.sneakernet.mail and org.sneakernet.fileshare. The org.sneakernet.* namespace is reserved for first-party applications like this – choose something else to identify your application.

Standard message headers

The following message headers have a standardized use:

Application and Content-Type are recommended to be included in every message.

Ingesting messages

The sneakernet daemon (sneakerd) can be configured to execute your message ingestion program via config.ini. Add the following to config.ini to register org.example.foobar with the foobarproc command:

[org.example.foobar]
cmd=foobarproc

When a message whose Application header is set to org.example.foobar arrives and is processed by sneakerd, it will execute foobarproc. The message payload is piped into the command’s standard input, and the command line arguments are used to pass additional information via a standard getopt-style interface:

Following the getopt options, the message hash (a SHA-256 hash uniquely identifying the message) is provided.

Receiving messages a posteriori

Messages can be verified and extracted from the database at a later time with the sncat command.

Publishing messages

The sneaker pub command can be used to publish messages. The plaintext payload is read from the standard input. The -H$key:$value option adds a header, and -r$peer_id adds a recipient. Messages with no recipients are published as public messages, and messages with at least one recipient are published as private messages.

Public key notation

Public keys for peers are written in base32 with the following alphabet: 0123456789abcdefghjkmnpqrstvwxyz, and no padding characters. Keys are 32-bit ed25519 public keys.

Hare support

Sneakernet is written in Hare, and a set of first-class modules for sneakernet integrations is included for application developers using Hare. See haredoc sneaker for more information.