From b7cbdb02013399f5162dc40b14b1baa824593c6a Mon Sep 17 00:00:00 2001 From: bui Date: Wed, 20 Mar 2024 16:18:06 +0100 Subject: [PATCH] allow to specify 'scopes' in the configuration. By default bouncer was restricting itself to IP scoped decisions --- cmd/root.go | 1 + pkg/cfg/config.go | 1 + 2 files changed, 2 insertions(+) diff --git a/cmd/root.go b/cmd/root.go index dd13701..a282595 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -101,6 +101,7 @@ func Execute() error { ScenariosContaining: strings.Join(config.CrowdsecConfig.IncludeScenariosContaining, ","), ScenariosNotContaining: strings.Join(config.CrowdsecConfig.ExcludeScenariosContaining, ","), Origins: strings.Join(config.CrowdsecConfig.OnlyIncludeDecisionsFrom, ","), + Scopes: strings.Join(config.CrowdsecConfig.Scopes, ","), }, UserAgent: "crowdsec-blocklist-mirror/" + version.String(), CertPath: config.CrowdsecConfig.CertPath, diff --git a/pkg/cfg/config.go b/pkg/cfg/config.go index 4ba3e32..6a20585 100644 --- a/pkg/cfg/config.go +++ b/pkg/cfg/config.go @@ -30,6 +30,7 @@ type CrowdsecConfig struct { IncludeScenariosContaining []string `yaml:"include_scenarios_containing"` ExcludeScenariosContaining []string `yaml:"exclude_scenarios_containing"` OnlyIncludeDecisionsFrom []string `yaml:"only_include_decisions_from"` + Scopes []string `yaml:"scopes,omitempty"` } type BlockListConfig struct {