package rendezvous

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

message Handshake

md-d2d-rendezvous.proto:294

Messages required for the initial lock-step handshake between RRD and RID.

(message has no fields)

message Handshake.RidToRrd

md-d2d-rendezvous.proto:322

Handshake messages from RID to RRD.

(message has no fields)

message Handshake.RidToRrd.AuthHello

md-d2d-rendezvous.proto:332

Initial message from RID responding to RRD's authentication challenge and containing RID's authentication challenge, encrypted by RID's encryption scheme with RIDAK. When receiving this message: 1. If the challenge `response` from RID does not match the challenge sent by RRD, close the connection with a protocol error (WS: `4000`) and abort these steps.

message Handshake.RrdToRid

md-d2d-rendezvous.proto:296

Handshake messages from RRD to RID.

(message has no fields)

message Handshake.RrdToRid.Auth

md-d2d-rendezvous.proto:315

Final message from RRD responding to RID's authentication challenge, encrypted by RRD's encryption scheme with RRDAK. When receiving this message: 1. If the challenge `response` from RRD does not match the challenge sent by RID, close the connection with a protocol error (WS: `4000`) and abort these steps.

message Handshake.RrdToRid.Hello

md-d2d-rendezvous.proto:299

Initial message from RRD containing its authentication challenge, encrypted by RRD's encryption scheme with RRDAK.

message Nominate

md-d2d-rendezvous.proto:357

Nominates the path. The upper-layer protocol defines whether RID or RRD may nominate and is encrypted by the respective encryption scheme with RIDTK or RRDTK. When receiving this message: 1. If the sender was not eligible to `Nominate`, close the connection with a protocol error (WS: `4000`) and abort these steps. 2. Close all other pending or established connection paths (WS: `1000`).¹ ¹: Closing other paths is only triggered by the receiver as it may otherwise lead to a race between nomination and close detection.

(message has no fields)

message RendezvousInit

md-d2d-rendezvous.proto:236

Contains the data necessary to initialise a 1:1 connection between two devices. When creating this message, run the following sub-steps simultaneously and wait for them to finish: 1. If the device is able to create a TCP server socket: 1. Bind to _any_ IP address with a random port number. Silently ignore failures. 2. If successful, let `addresses` be the list of available IP addresses on network interfaces the server has been bound to. 3. Drop any loopback and duplicate IP addresses from `addresses`. 4. Drop link-local IPv6 addresses associated to interfaces that only provide link-local IPv6 addresses. 5. Sort `addresses` in the following way, highest priority first: 1. IP addresses on unmetered, fast networks 2. IP addresses on unmetered, slow networks 3. IP addresses on metered, fast networks 4. Any other addresses 6. Complete the subroutine and provide `addresses` and other necessary data in the `direct_tcp_server` field. 2. Connect to a WebSocket relay server: 1. Generate a random 32 byte hex-encoded rendezvous path. 2. Connect to the WebSocket relay server URL as provided by the context with the generated hex-encoded rendezvous path. 3. Once connected, complete the subroutine and provide the necessary data in the `relayed_web_socket` field. When receiving this message: 1. If `version` is unsupported, abort these steps. 2. If any `path_id` is not unique, abort these steps. 3. If the device is able to create a TCP client connection: 1. Let `addresses` be the IP addresses of `direct_tcp_server`. 2. Filter `addresses` by discarding IPs with unsupported families (e.g. if the device has no IPv6 address, drop any IPv6 addresses). 3. For each IP address in `addresses`: 1. Connect to the given IP address in the background. 2. Wait 100ms. 4. Connect to the provided relayed WebSocket server in the background. 5. On each successful direct or relayed connection made in the background, forward an event to the upper-layer protocol in order for it to select one of the paths for nomination.

Used in: url.DeviceGroupJoinRequestOrOffer

message RendezvousInit.DirectTcpServer

md-d2d-rendezvous.proto:271

Direct path to a TCP server created by the initiator

Used in: RendezvousInit

message RendezvousInit.DirectTcpServer.IpAddress

md-d2d-rendezvous.proto:279

An IP address

Used in: DirectTcpServer

enum RendezvousInit.NetworkCost

md-d2d-rendezvous.proto:247

Network cost of an interface

Used in: DirectTcpServer.IpAddress, RelayedWebSocket

message RendezvousInit.RelayedWebSocket

md-d2d-rendezvous.proto:257

Relayed WebSocket path

Used in: RendezvousInit

enum RendezvousInit.Version

md-d2d-rendezvous.proto:237

Used in: RendezvousInit