Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for blocking logically inbound connections #2221

Open
aschmahmann opened this issue Mar 26, 2023 · 0 comments
Open

Support for blocking logically inbound connections #2221

aschmahmann opened this issue Mar 26, 2023 · 0 comments
Labels
exp/expert Having worked on the specific codebase is important P2 Medium: Good to have, but can wait until someone steps up

Comments

@aschmahmann
Copy link
Collaborator

go-libp2p has a ConnectionGater interface that allows the user to control the types of inbound and outbound connections that a given host can make. However, as far as I can tell these limitations are based at the Transport level which does not interact nicely with DCuTR.

I suspect there is a class of users (perhaps most of them) that when blocking inbound connections what they really mean to be doing is blocking logically inbound connections rather than ones that are mechanically inbound. An example use case here might be a user running a libp2p node on a public IP address that wants to fetch data from many peers (including those behind NATs which will do DCuTR dialback) but does not want to communicate with any peers other than those it has reached out to.

In a mode where there is support for blocking logically inbound connections we would end up with the following: ( ❌ means we want a failure, ✅ means we want a success)

  • Someone dialing me over tcp ❌
  • Me dialing someone over tcp ✅
  • Someone dialing me over tcp using a DCuTR dialback after I dialed them ✅
  • Someone dialing me via a relay and getting me to connect to them via a DCuTR dialback ❌

IIUC this contrasts with using the ConnectionGater to deny all InterceptAccept responses since it would give the correct result for 1, 2 and 4 but an incorrect result for 3.

@p-shahi p-shahi added the kind/discussion Topical discussion; usually not changes to codebase label May 22, 2023
@p-shahi p-shahi added exp/expert Having worked on the specific codebase is important P2 Medium: Good to have, but can wait until someone steps up and removed kind/discussion Topical discussion; usually not changes to codebase labels May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/expert Having worked on the specific codebase is important P2 Medium: Good to have, but can wait until someone steps up
Projects
Status: todo
Development

No branches or pull requests

2 participants