A decentralized p2p library powered by Rust, which is devoted to simple use.
Features
- UDP hole punching for both Cone and Symmetric Nat
- TCP hole punching for NAT1
- Enables reliable transport over KCP
- Enables secure encryption with AesGcm or ChaCha20Poly1305.
Description
For connecting two peers, all you need to do is to give the configuration as done in the example. In short, provide a peer named C, peer A and B can directly connect to C, then A and B will find each other by C, A and C can directly connect by hole-punching, the whole process is done by this library. If two peers D and F cannot directly connect via hole-punching, this library can find the best link for indirectly connection(i.e. through some middle nodes).
Example
use Builder;
use GroupCode;
use Algorithm;
use PeerNodeAddress;
use Ipv4Addr;
use Arc;
async