crowdsecurity / cs-cloudflare-bouncer

A CrowdSec Bouncer that syncs the decisions made by CrowdSec with CloudFlare's firewall. Manages multi user, multi account, multi zone setup. Supports IP, Country and AS scoped decisions.
MIT License
50 stars 7 forks source link

sync goroutine / configuration / service mgmt behavior with other go bouncers #136

Closed mmetc closed 1 year ago

mmetc commented 1 year ago

As you can see from the error in this PR, the new version of the stream bouncer takes a context object to synchronize the goroutines.

We should update the cloudflare bouncer, either by using a cancel function ( https://github.com/crowdsecurity/go-cs-bouncer/blob/main/examples/stream/stream_bouncer.go ) or, if possible, with the errgroup package like we've done in the other bouncers (firewall, custom, blocklist).