-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Description
Today, a user of rust-libp2p
can make a reservation on a relay by instructing the Swarm
to listen_on
a relayed address, i.e. one with /p2p-circuit
in it.
We should develop a module similar to go-libp2p
s AutoRelay that does this automatically as we connect to relays:
- Upon a new connection, check the supported protocols on that connection for the relay "hop" protocol.
- Based on some configuration (to be decided), conclude that we should make a new reservation.
- Emit a
ToSwarm::ListenOn
command with a constructed/p2p-circuit
address for the discovered relay.
Motivation
Give users a module they can drop into their Behaviour
that automatically creates reservations as we connect to relays.
Requirements
- The number of reservations we make must be bounded by something, i.e. maximum 10. Should probably be configurable.
- We may want to make this conditional on our number of external addresses. If we don't have any external addresses, reservations will be useful because it means we are likely behind a NAT.
Open questions
No response
Are you planning to do it yourself in a pull request ?
No
NiKrause and MatthiasvBferrohd
Metadata
Metadata
Assignees
Labels
No labels