rust-p2p
NAT traversal for p2p communication, this is implemented in terms of a hole-punching technique.
This crate provides a convenient way to create connections between multiple remote peers that may be behind Nats, these tunnel that are spawned from the TunnelFactory can be used to read/write bytes from/to a peer to another.
The underlying transport protocols are TCP, UDP in the tunnel.
This crate is built on the async ecosystem tokio
Supported Platforms
It's a cross-platform crate
Usage
Add this dependency to your cargo.toml
= { = "0.3"}
Example
use ;
use LengthPrefixedInitCodec;
use new_tunnel_component;
async
It is recommended to use rustp2p directly, which is ergonomic and easy to use.