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

Add Filters option #717

Merged
merged 1 commit into from
Sep 5, 2019
Merged

Add Filters option #717

merged 1 commit into from
Sep 5, 2019

Conversation

albrow
Copy link
Contributor

@albrow albrow commented Sep 4, 2019

The new Filters option allows users to take ownership of the Filters struct and is suitable for cases where the addresses you want to accept/deny can change over time. We're using it in 0x Mesh to implement IP-based rate-limiting/banning (see 0xProject/0x-mesh#392).

@albrow
Copy link
Contributor Author

albrow commented Sep 4, 2019

Ping @raulk.

@raulk
Copy link
Member

raulk commented Sep 4, 2019

Thanks for this! Requesting a sanity check from @Stebalien and @bigs.

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@raulk raulk merged commit 1b9b84b into libp2p:master Sep 5, 2019
t4n6a1ka pushed a commit to t4n6a1ka/go-libp2p that referenced this pull request Sep 5, 2019
The new `Filters` option allows users to take ownership of the `Filters` struct, and is suitable for cases where the addresses you want to accept/deny change dynamically.
t4n6a1ka pushed a commit to t4n6a1ka/go-libp2p that referenced this pull request Sep 5, 2019
The new `Filters` option allows users to take ownership of the `Filters` struct, and is suitable for cases where the addresses you want to accept/deny change dynamically.
t4n6a1ka added a commit to t4n6a1ka/go-libp2p that referenced this pull request Sep 5, 2019
* TestStreamsStress: reduce node count, increase stream density.

* upgrade peerstore.

* fix libp2p#672: wait until done; fix ponger response.

* remove superfluous goroutine; avoid t.Fatal from goroutines.

* mdns: always use interface addresses

We don't want to use the transformed/munged host addresses for local
announcements. Ideally, we'd take a more scientific approach to this (i.e.,
"host, please give me addresses relative to X") but we can't do that yet.

* Removed ineffectual assignments

We don't use `cs` here, drop it.

* Fixed typos (libp2p#680)

Just a few nit-picky typo fixes.

* Make use of time.Until & time.Since (libp2p#681)

No need to manually subtract timestamps.

* Simplify increments (libp2p#684)

* Avoid unnecessary conversions (libp2p#685)

No need to convert these types.

* Added missing error check in test (libp2p#683)

* gomod: update go-libp2p-circuit

* autorelay: ensure candidate relays can hop

* Update deps, mocknet tests

* Adjust test timings for Ed25519

* Bump secio

* Bump swarm version

* new: allow overriding the user-agent with an option

Instead of using a global variable.

This also:

* Adds an option to the identify service to set the user agent.
* Removes the ability to pass an identify service to NewHost as any reasonable
  Identify service already needs to be constructed with an instance of the host.

* set a default client-version using go modules

This should help us improve network stats on who's using libp2p.

* ci: bump go to 1.12

* README: bump to go 1.12

* dep: update go-libp2p-swarm

Fixes a race condition when a user modifies the address list returned by InterfaceListenAddresses.

* use new constructor for insecure transport (libp2p#706)

* dep: upgrade eventbus to v0.1.0 (libp2p#709)

* add godocs.

* Update main.yml

* Add Filters option (libp2p#717)

The new `Filters` option allows users to take ownership of the `Filters` struct, and is suitable for cases where the addresses you want to accept/deny change dynamically.

* Rename main.yml to : [^main.yml]

* mdns: always use interface addresses

We don't want to use the transformed/munged host addresses for local
announcements. Ideally, we'd take a more scientific approach to this (i.e.,
"host, please give me addresses relative to X") but we can't do that yet.

* TestStreamsStress: reduce node count, increase stream density.

* upgrade peerstore.

* fix libp2p#672: wait until done; fix ponger response.

* remove superfluous goroutine; avoid t.Fatal from goroutines.

* Removed ineffectual assignments

We don't use `cs` here, drop it.

* Fixed typos (libp2p#680)

Just a few nit-picky typo fixes.

* Make use of time.Until & time.Since (libp2p#681)

No need to manually subtract timestamps.

* Simplify increments (libp2p#684)

* Avoid unnecessary conversions (libp2p#685)

No need to convert these types.

* Added missing error check in test (libp2p#683)

* gomod: update go-libp2p-circuit

* autorelay: ensure candidate relays can hop

* Update deps, mocknet tests

* Adjust test timings for Ed25519

* Bump secio

* Bump swarm version

* new: allow overriding the user-agent with an option

Instead of using a global variable.

This also:

* Adds an option to the identify service to set the user agent.
* Removes the ability to pass an identify service to NewHost as any reasonable
  Identify service already needs to be constructed with an instance of the host.

* set a default client-version using go modules

This should help us improve network stats on who's using libp2p.

* ci: bump go to 1.12

* README: bump to go 1.12

* dep: update go-libp2p-swarm

Fixes a race condition when a user modifies the address list returned by InterfaceListenAddresses.

* use new constructor for insecure transport (libp2p#706)

* dep: upgrade eventbus to v0.1.0 (libp2p#709)

* add godocs.

* Add Filters option (libp2p#717)

The new `Filters` option allows users to take ownership of the `Filters` struct, and is suitable for cases where the addresses you want to accept/deny change dynamically.

* Rename : [^main.yml] to `.'yml*go (sawi)

* Rename `.'yml*go (sawi) to `.'yml*go #(sawi)

* Rename `.'yml*go #(sawi) to `.'yml*go
@albrow albrow deleted the filters-option branch September 5, 2019 19:37
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

Successfully merging this pull request may close these issues.

3 participants