enhancement: include non public relay addresses to be advertised too #3361 #3365
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reference
#3361
What is the issue
Private based relays are unable to populate the
Reservation.Addrs
when non of its addresses are public.Expected behavior.
Permit the relay to respond with all its public addresses which is already filtered with the following line:
go-libp2p/p2p/protocol/circuitv2/relay/relay.go
Line 596 in f6c14a2
But also include those addresses shared with the connected peer. This could be performed by comparing
stream.Conn().RemoteMultiaddr()
andstream.Conn().LocalMultiaddr()
.Even so, what about including all of its addresses with filtering? Is there any security consideration. Because they could anyway be guessed based on the statements of bellow.
Why this is a issue
A valid circuit multiaddress can be successfully constructed and used based on the known addresses found on the
AddrInfo
of the connected peer. The problem is, then why we even care ofReservation.Addrs
if that is possible this field is latency in the packet. We need to enforce the use ofReservation.Addrs
by including information that can be actually used by the relay client.