-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Expose libp2p connection filtering #7724
Comments
just happened again - would be nice to have this implemented as it creates problems in properly monitored hosted environments. |
we are getting frequent alerts and portscanning reports due to this. In some cases, providers maybe shutdown nodes because of this. |
I have a few questions, just to be sure we agree on what we're doing here:
/cc @jennijuju @f8-ptrk @jleni 🤝 |
@placer14 I think it should go in Line 44 in 6f316cd
@magik6k @@aschmahmann could you please provide more directions? |
@placer14 you're probably looking to emulate something like https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#swarmaddrfilters. Probably the most common set of filters are the ones for disallowing private network connections (i.e. the server profile https://github.com/ipfs/go-ipfs-config/blob/ce20398638c38d2b3961dfc0854f2f7237c39964/profile.go#L48). Here is how the libp2p option is instantiated in go-ipfs https://github.com/ipfs/go-ipfs/blob/91c52657166bcf86f2476926e4fe56694dc26562/core/node/libp2p/addrs.go#L13 using the structs in https://github.com/ipfs/go-ipfs/blob/956c24856d50770620eb2f8b42f478aca8049560/core/node/libp2p/filters.go basically for backwards compatibility for how we manipulate the address filters on the fly. You could probably use https://github.com/libp2p/go-libp2p/blob/7a35d0df9769c1d5b7ca0a1e83eb0fe0e67bc1f5/p2p/net/conngater/conngater.go#L46 though, or some more generic ConnectionGater. |
Checklist
Ideas
.Lotus component
Improvement Suggestion
this ipfs issue is getting lotus nodes undesired connection as well, i.e from one peer:
lotus should be able to filter those connection out
The text was updated successfully, but these errors were encountered: