protocols/: Add basic AutoNAT implementation (#2262)

This commit adds a behaviour protocol that implements the AutoNAT specification.
It enables users to detect whether they are behind a NAT. The Autonat Protocol
implements a Codec for the Request-Response protocol, and wraps it in a new
Network Behaviour with some additional functionality.

Co-authored-by: David Craven <david@craven.ch>
Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
Elena Frank
2022-01-14 10:27:28 +01:00
committed by GitHub
parent ddc035170d
commit c61ea6ad29
14 changed files with 2970 additions and 0 deletions

View File

@ -40,6 +40,10 @@ pub use libp2p_core::multihash;
#[doc(inline)]
pub use multiaddr;
#[cfg(feature = "autonat")]
#[cfg_attr(docsrs, doc(cfg(feature = "autonat")))]
#[doc(inline)]
pub use libp2p_autonat as autonat;
#[doc(inline)]
pub use libp2p_core as core;
#[cfg(feature = "deflate")]