#veilid #communication #encryption #rl #communication-channel

veilid_duplex

Full-duplex encrypted communication between 2 nodes

9 releases

0.2.2 Sep 22, 2024
0.2.1 Jul 7, 2024
0.2.0 Apr 7, 2024
0.1.6 Nov 29, 2023
0.1.0 Oct 25, 2023

#357 in Cryptography

Download history 138/week @ 2024-07-05 9/week @ 2024-07-12 39/week @ 2024-07-26 5/week @ 2024-08-02 6/week @ 2024-09-13 167/week @ 2024-09-20 45/week @ 2024-09-27 10/week @ 2024-10-04

228 downloads per month
Used in bevy_veilid

MIT/Apache and maybe GPL-3.0-only

41KB
774 lines

veilid_duplex

Full-duplex asyncronous communication between two peers with Veilid.

  • Alice publishes her route to DHT and sends DHT key to Bob. Alice will update here route on DHT when connection breaks;
  • Bob does the same, and sends his DHT key to Alice over Veilid channel.
  • When Alice or Bob fail to send a message they try getting a new route from DHT. They also update their DHT records when their routes die.
  • Sometimes a message will be delivered twice, so Alice and Bob keep a record of all hashed messages they got.

Veilid duplex manages veilid internals for you, such as allocating routes and recovering from route shutdowns.

Changlelog

  • 0.1.5 WASM support

Usage

See pingpong example.

Examples

Pingpong

2 peers increment the counter and pass it to each other.

Host:

cargo run --example pingpong -- --server --verbose

This will print host's DHT key

Client:

cargo run --example pingpong --  --verbose --client "VLD0:MDoZwLsoQgM6-XKE3giy-8r53e4yCod5Y546laT0El0"

Dependencies

~9–51MB
~889K SLoC