Arpan Kapoor cf3e4c6860
feat(quic): implement hole punching
Implement `Transport::dial_as_listener` for QUIC as specified by the [DCUtR spec](https://github.com/libp2p/specs/blob/master/relay/DCUtR.md).

To facilitate hole punching in QUIC, one side needs to send random UDP packets to establish a mapping in the routing table of the NAT device. If successful, our listener will emit a new inbound connection. This connection needs to then be sent to the dialing task. We achieve this by storing a `HashMap` of hole punch attempts indexed by the remote's `SocketAddr`. A matching incoming connection is then sent via a oneshot channel to the dialing task which continues with upgrading the connection.

Related #2883.

Pull-Request: #3964.
2023-06-13 11:42:18 +00:00
..
2023-06-13 11:42:18 +00:00

Examples

A set of examples showcasing how to use rust-libp2p.

Getting started

Individual libp2p features

  • Chat A basic chat application demonstrating libp2p and the mDNS and Gossipsub protocols.

  • Distributed key-value store A basic key value store demonstrating libp2p and the mDNS and Kademlia protocol.

  • File sharing application Basic file sharing application with peers either providing or locating and getting files by name.

    While obviously showcasing how to build a basic file sharing application with the Kademlia and Request-Response protocol, the actual goal of this example is to show how to integrate rust-libp2p into a larger application.

  • IPFS Kademlia Demonstrates how to perform Kademlia queries on the IPFS network.

  • IPFS Private Implementation using the gossipsub, ping and identify protocols to implement the ipfs private swarms feature.

  • Ping Small ping clone, sending a ping to a peer, expecting a pong as a response. See tutorial for a step-by-step guide building the example.

  • Rendezvous Rendezvous Protocol. See specs.