Module magic_wormhole::transit

source ·
Expand description

Connect two sides via TCP, no matter where they are

This protocol is the second part where the Wormhole magic happens. It does not strictly require a Wormhole connection, but it depends on some kind of secure communication channel to talk to the other side. Conveniently, Wormhole provides exactly such a thing :)

Both clients exchange messages containing hints on how to find each other. These may be local IP addresses for in case they are in the same network, or the URL to a relay server. In case a direct connection fails, both will connect to the relay server which will transparently glue the connections together.

Each side might implement (or use/enable) some abilities.

Notice: while the resulting TCP connection is naturally bi-directional, the handshake is not symmetric. There must be one “leader” side and one “follower” side (formerly called “sender” and “receiver”).

Structs

Enums

Constants

Functions