rust-ipfs
rust-ipfs copied to clipboard
Auto relay connection
Should add a option to add listen on a relay automatically while behind a NAT. This would allow us to walk through DHT and find any peers that has the relay v2 protocol in which case we would then listen to it automatically. There are a couple of things that might need to be done
- Build up a map to keep track of active peers with the relay protocol
- Determine the max number we can and should listen on ~~(eg does it do anything to listen on multiple relays as been done manually?).~~
- Only use relays when behind a nat or firewall, otherwise dont use relays unless connection is being blocked in some way.
- Track the
ListenId
after doingSwarm::listen_on
and use it to remove the listener when there is an issue related to it
Draft should be first implemented into this crate and once its figured out to split it out into its own crate (or implement directly into libp2p?).