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

Connection gating: default gater implementations #930

Closed
8 tasks
raulk opened this issue May 15, 2020 · 1 comment
Closed
8 tasks

Connection gating: default gater implementations #930

raulk opened this issue May 15, 2020 · 1 comment

Comments

@raulk
Copy link
Member

raulk commented May 15, 2020

Motivation

Now that #872 has landed, we have the abstractions and the hooks in the right places to actively intercept inbound and outbound connections at the following lifecycle stages:

  • peer being dialled.
  • address being dialled.
  • connection being accepted.
  • connection secured and authenticated.
  • connection fully upgraded (or equivalent, i.e. we have a fully capable connection).

Next step is to implement gaters for common use cases.

Goals

  • Implement gaters for common use cases.
    • blacklisting peers by peer ID.
    • rejecting connections based on current connection count.
    • rejecting connections based on desired in/out connection quotas.
    • functional connection gater where user can plug in specific functions for each intercept, so that folks don't have to implement entire interfaces when they only want to capture at a specific stage.
  • Implement a composite gater so we can chain these together.

This is a follow-up to #872.

@marten-seemann
Copy link
Contributor

It looks like users have been successfully been using the connection gater without any default implementations. I'm not sure if there's a lot of value in providing implementations here.

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

No branches or pull requests

2 participants