Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Better handle laddrs in Listen #28

Open
Stebalien opened this issue Feb 15, 2018 · 7 comments
Open

Better handle laddrs in Listen #28

Stebalien opened this issue Feb 15, 2018 · 7 comments
Assignees

Comments

@Stebalien
Copy link
Member

Stebalien commented Feb 15, 2018

  1. Listen("/p2p-circuit") should behave as it does today.
  2. Listen("/ipfs/QmOther/p2p-circuit") should dial QmOther, keep the connection open (and fail to listen if we can't dial them), and check if they support relaying.
  3. Listen should only work if: (1) we understand all the protocols in the local addr and (2) the mutliaddr ends with /p2p-circuit. Currently, we just check if it contains /p2p-circuit and accept it.
  4. We should use calls to Listen to signal that we accept relayed connections (and from where).
@Stebalien Stebalien self-assigned this Feb 20, 2018
@Stebalien
Copy link
Member Author

Example for point 4:

  • Listen("/p2p-circuit") returns a listener that listens for all inbound circuit relay connections.
  • Listen("/ipfs/QmRelay/p2p-circuit") returns a listener that only accepts relayed connections from QmRelay.

This is kind of pedantic but it allows users select which peers they want to use as relays (may be useful in cases where some links are cheaper than others).

@vyzo
Copy link
Contributor

vyzo commented Feb 21, 2018

I think point (2) is the really important one, as it ensures we have a connection open to the relay.

@Stebalien
Copy link
Member Author

@vyzo given that we've now enabled relay by default in go-libp2p, I'd like to fix this (at least point 3) ASAP so we can remove this dance.

@Stebalien
Copy link
Member Author

That is, we should:

  1. Add a default listen addr of /p2p-circuit.
  2. Keep the relay enabled (for dialing) even if we run NoListenAddrs.

@vyzo
Copy link
Contributor

vyzo commented Oct 24, 2018

That's fine by me.

@raulk
Copy link
Member

raulk commented Feb 5, 2019

@vyzo wondering if we made progress with this? I recall seeing related changes come through.

@vyzo
Copy link
Contributor

vyzo commented Feb 5, 2019

no progress to be reported.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants