deltachat::imex

Module transfer

source
Expand description

Transfer a backup to an other device.

This module provides support for using iroh to initiate transfer of a backup to another device using a QR code.

There are two parties to this:

  • The Provider, which starts a server and listens for connections.
  • The Getter, which connects to the server and retrieves the data.

Both the provider and the getter are authenticated:

  • The provider is known by its peer ID.
  • The provider needs an authentication token from the getter before it accepts a connection.

Both these are transferred in the QR code offered to the getter. This ensures that the getter can not connect to an impersonated provider and the provider does not offer the download to an impersonated getter.

Protocol starts by getter opening a bidirectional QUIC stream to the provider and sending authentication token. Provider verifies received authentication token, sends the size of all files in a backup (database and all blobs) as an unsigned 64-bit big endian integer and streams the backup in tar format. Getter receives the backup and acknowledges successful reception by sending a single byte. Provider closes the endpoint after receiving an acknowledgment.

Structs§

Constants§

  • ALPN protocol identifier for the backup transfer protocol.

Functions§