SYMBOL INDEX (245 symbols across 38 files) FILE: .github/release.py function _goos (line 11) | def _goos(): function _goarch (line 16) | def _goarch(goos): function _goarm (line 27) | def _goarm(goarch): function _build_tarball (line 35) | def _build_tarball(os): function filename_for_entry (line 42) | def filename_for_entry(prog_name, entry): function matrix (line 52) | def matrix(prog_name): function print_matrix (line 69) | def print_matrix(prog_name): function run_build (line 93) | def run_build(prog_name): function main (line 141) | def main(): FILE: cmd/root.go constant bouncerType (line 33) | bouncerType = "crowdsec-firewall-bouncer" function backendCleanup (line 37) | func backendCleanup(backend *backend.BackendCTX) { function HandleSignals (line 45) | func HandleSignals(ctx context.Context) error { function deleteDecisions (line 64) | func deleteDecisions(backend *backend.BackendCTX, decisions []*models.De... function addDecisions (line 104) | func addDecisions(backend *backend.BackendCTX, decisions []*models.Decis... function Execute (line 141) | func Execute() error { FILE: main.go function main (line 9) | func main() { FILE: pkg/backend/backend.go type BackendCTX (line 20) | type BackendCTX struct method Init (line 24) | func (b *BackendCTX) Init() error { method Commit (line 28) | func (b *BackendCTX) Commit() error { method ShutDown (line 32) | func (b *BackendCTX) ShutDown() error { method Add (line 36) | func (b *BackendCTX) Add(decision *models.Decision) error { method Delete (line 40) | func (b *BackendCTX) Delete(decision *models.Decision) error { method CollectMetrics (line 44) | func (b *BackendCTX) CollectMetrics() { function isPFSupported (line 49) | func isPFSupported(runtimeOS string) bool { function NewBackend (line 62) | func NewBackend(config *cfg.BouncerConfig) (*BackendCTX, error) { FILE: pkg/cfg/config.go type PrometheusConfig (line 15) | type PrometheusConfig struct type nftablesFamilyConfig (line 21) | type nftablesFamilyConfig struct constant IpsetMode (line 30) | IpsetMode = "ipset" constant IptablesMode (line 31) | IptablesMode = "iptables" constant NftablesMode (line 32) | NftablesMode = "nftables" constant PfMode (line 33) | PfMode = "pf" constant DryRunMode (line 34) | DryRunMode = "dry-run" type BouncerConfig (line 37) | type BouncerConfig struct function MergedConfig (line 75) | func MergedConfig(configPath string) ([]byte, error) { function NewConfig (line 86) | func NewConfig(reader io.Reader) (*BouncerConfig, error) { function pfConfig (line 165) | func pfConfig(config *BouncerConfig) error { function nftablesConfig (line 173) | func nftablesConfig(config *BouncerConfig) error { FILE: pkg/cfg/logging.go type LoggingConfig (line 17) | type LoggingConfig struct method LoggerForFile (line 27) | func (c *LoggingConfig) LoggerForFile(fileName string) (io.Writer, err... method setDefaults (line 46) | func (c *LoggingConfig) setDefaults() { method validate (line 76) | func (c *LoggingConfig) validate() error { method setup (line 84) | func (c *LoggingConfig) setup(fileName string) error { FILE: pkg/dryrun/dryrun.go type dryRun (line 12) | type dryRun struct method Init (line 18) | func (*dryRun) Init() error { method Commit (line 23) | func (*dryRun) Commit() error { method Add (line 28) | func (*dryRun) Add(decision *models.Decision) error { method CollectMetrics (line 33) | func (*dryRun) CollectMetrics() { method Delete (line 37) | func (*dryRun) Delete(decision *models.Decision) error { method ShutDown (line 42) | func (*dryRun) ShutDown() error { function NewDryRun (line 14) | func NewDryRun(_ *cfg.BouncerConfig) (types.Backend, error) { FILE: pkg/ipsetcmd/ipset.go type IPSet (line 13) | type IPSet struct method Create (line 41) | func (i *IPSet) Create(opts CreateOptions) error { method Add (line 72) | func (i *IPSet) Add(entry string) error { method DeleteEntry (line 85) | func (i *IPSet) DeleteEntry(entry string) error { method List (line 98) | func (i *IPSet) List() ([]string, error) { method Flush (line 111) | func (i *IPSet) Flush() error { method Destroy (line 124) | func (i *IPSet) Destroy() error { method Rename (line 137) | func (i *IPSet) Rename(toSetName string) error { method Test (line 152) | func (i *IPSet) Test(entry string) error { method Save (line 165) | func (i *IPSet) Save() ([]string, error) { method Restore (line 178) | func (i *IPSet) Restore(filename string) error { method Swap (line 191) | func (i *IPSet) Swap(toSetName string) error { method Name (line 206) | func (i *IPSet) Name() string { method Exists (line 210) | func (i *IPSet) Exists() bool { method Len (line 218) | func (i *IPSet) Len() int { type CreateOptions (line 18) | type CreateOptions struct constant ipsetBinary (line 26) | ipsetBinary = "ipset" function NewIPSet (line 28) | func NewIPSet(setName string) (*IPSet, error) { function GetSetsStartingWith (line 250) | func GetSetsStartingWith(name string) (map[string]*IPSet, error) { FILE: pkg/iptables/iptables.go constant IPTablesDroppedPacketIdx (line 22) | IPTablesDroppedPacketIdx = 0 constant IPTablesDroppedByteIdx (line 23) | IPTablesDroppedByteIdx = 1 type iptables (line 26) | type iptables struct method Init (line 150) | func (ipt *iptables) Init() error { method Commit (line 179) | func (ipt *iptables) Commit() error { method Add (line 197) | func (ipt *iptables) Add(decision *models.Decision) error { method ShutDown (line 221) | func (ipt *iptables) ShutDown() error { method Delete (line 237) | func (ipt *iptables) Delete(decision *models.Decision) error { function NewIPTables (line 31) | func NewIPTables(config *cfg.BouncerConfig) (types.Backend, error) { FILE: pkg/iptables/iptables_context.go constant chainName (line 22) | chainName = "CROWDSEC_CHAIN" constant loggingChainName (line 23) | loggingChainName = "CROWDSEC_LOG" constant dockerUserChainName (line 24) | dockerUserChainName = "DOCKER-USER" constant maxBanSeconds (line 25) | maxBanSeconds = 2147483 constant defaultTimeout (line 26) | defaultTimeout = "300" type ipTablesContext (line 29) | type ipTablesContext struct method chainExist (line 59) | func (ctx *ipTablesContext) chainExist(chainName string) bool { method setupChain (line 70) | func (ctx *ipTablesContext) setupChain() { method deleteChain (line 138) | func (ctx *ipTablesContext) deleteChain() { method createRule (line 194) | func (ctx *ipTablesContext) createRule(setName string, origin string) { method commit (line 216) | func (ctx *ipTablesContext) commit() error { method add (line 362) | func (ctx *ipTablesContext) add(decision *models.Decision) { method shutDown (line 366) | func (ctx *ipTablesContext) shutDown() error { method delete (line 397) | func (ctx *ipTablesContext) delete(decision *models.Decision) error { FILE: pkg/iptables/iptables_stub.go function NewIPTables (line 10) | func NewIPTables(config *cfg.BouncerConfig) (types.Backend, error) { FILE: pkg/iptables/metrics.go method collectMetricsIptables (line 42) | func (ctx *ipTablesContext) collectMetricsIptables(scanner *bufio.Scanne... type chainCounters (line 136) | type chainCounters struct method collectMetricsIpset (line 143) | func (ctx *ipTablesContext) collectMetricsIpset(scanner *bufio.Scanner) ... method collectMetrics (line 240) | func (ctx *ipTablesContext) collectMetrics() (map[string]uint64, map[str... method CollectMetrics (line 273) | func (ipt *iptables) CollectMetrics() { FILE: pkg/metrics/metrics.go constant CollectionInterval (line 16) | CollectionInterval = time.Second * 10 type metricName (line 18) | type metricName constant DroppedPackets (line 21) | DroppedPackets metricName = "fw_bouncer_dropped_packets" constant DroppedBytes (line 22) | DroppedBytes metricName = "fw_bouncer_dropped_bytes" constant ProcessedPackets (line 23) | ProcessedPackets metricName = "fw_bouncer_processed_packets" constant ProcessedBytes (line 24) | ProcessedBytes metricName = "fw_bouncer_processed_bytes" constant ActiveBannedIPs (line 25) | ActiveBannedIPs metricName = "fw_bouncer_banned_ips" type backendCollector (line 28) | type backendCollector interface type Handler (line 32) | type Handler struct method MetricsUpdater (line 130) | func (m Handler) MetricsUpdater(met *models.RemediationComponentsMetri... method ComputeMetricsHandler (line 201) | func (m Handler) ComputeMetricsHandler(next http.Handler) http.Handler { type metricConfig (line 36) | type metricConfig struct type metricMap (line 45) | type metricMap method MustRegisterAll (line 47) | func (m metricMap) MustRegisterAll() { function getLabelValue (line 119) | func getLabelValue(labels []*io_prometheus_client.LabelPair, key string)... FILE: pkg/nftables/metrics.go method collectDroppedPackets (line 18) | func (c *nftContext) collectDroppedPackets() (map[string]uint64, map[str... method collectActiveBannedIPs (line 63) | func (c *nftContext) collectActiveBannedIPs() (map[string]int, error) { method collectDropped (line 85) | func (c *nftContext) collectDropped() (map[string]uint64, map[string]uin... function getOriginForList (line 103) | func getOriginForList(origin string) string { method CollectMetrics (line 111) | func (n *nft) CollectMetrics() { FILE: pkg/nftables/nftables.go constant chunkSize (line 21) | chunkSize = 200 constant defaultTimeout (line 22) | defaultTimeout = "4h" type nft (line 25) | type nft struct method Init (line 49) | func (n *nft) Init() error { method Add (line 65) | func (n *nft) Add(decision *models.Decision) error { method getBannedState (line 70) | func (n *nft) getBannedState() (map[string]struct{}, error) { method reset (line 83) | func (n *nft) reset() { method commitDeletedDecisions (line 88) | func (n *nft) commitDeletedDecisions() error { method createSetAndRuleForOrigin (line 142) | func (n *nft) createSetAndRuleForOrigin(ctx *nftContext, origin string... method commitAddedDecisions (line 173) | func (n *nft) commitAddedDecisions() error { method Commit (line 253) | func (n *nft) Commit() error { method Delete (line 307) | func (n *nft) Delete(decision *models.Decision) error { method ShutDown (line 312) | func (n *nft) ShutDown() error { function NewNFTables (line 36) | func NewNFTables(config *cfg.BouncerConfig) (*nft, error) { type tmpDecisions (line 263) | type tmpDecisions struct function normalizedDecisions (line 270) | func normalizedDecisions(decisions []*models.Decision) []*models.Decision { FILE: pkg/nftables/nftables_context.go type nftContext (line 30) | type nftContext struct method setBanned (line 113) | func (c *nftContext) setBanned(banned map[string]struct{}) error { method initSetOnly (line 132) | func (c *nftContext) initSetOnly() error { method initOwnTable (line 170) | func (c *nftContext) initOwnTable(hooks []string) error { method init (line 232) | func (c *nftContext) init(hooks []string) error { method lookupTable (line 260) | func (c *nftContext) lookupTable() (*nftables.Table, error) { method createRule (line 275) | func (c *nftContext) createRule(chain *nftables.Chain, set *nftables.Set, method deleteElementChunk (line 348) | func (c *nftContext) deleteElementChunk(els []nftables.SetElement) err... method deleteElements (line 377) | func (c *nftContext) deleteElements(els []nftables.SetElement) error { method addElements (line 393) | func (c *nftContext) addElements(els map[string][]nftables.SetElement)... method shutDown (line 421) | func (c *nftContext) shutDown() error { function reprIP (line 48) | func reprIP(ip []byte) string { function NewNFTV4Context (line 52) | func NewNFTV4Context(config *cfg.BouncerConfig) *nftContext { function NewNFTV6Context (line 82) | func NewNFTV6Context(config *cfg.BouncerConfig) *nftContext { FILE: pkg/nftables/nftables_stub.go function NewNFTables (line 10) | func NewNFTables(config *cfg.BouncerConfig) (types.Backend, error) { FILE: pkg/pf/metrics.go type counter (line 16) | type counter struct function parseMetrics (line 27) | func parseMetrics(reader *strings.Reader, tables []string) map[string]co... function countIPs (line 83) | func countIPs(table string) int { method CollectMetrics (line 99) | func (pf *pf) CollectMetrics() { FILE: pkg/pf/metrics_test.go function TestParseMetrics (line 11) | func TestParseMetrics(t *testing.T) { FILE: pkg/pf/pf.go type pf (line 17) | type pf struct method Init (line 69) | func (pf *pf) Init() error { method Commit (line 93) | func (pf *pf) Commit() error { method Add (line 103) | func (pf *pf) Add(decision *models.Decision) error { method reset (line 108) | func (pf *pf) reset() { method commitDeletedDecisions (line 113) | func (pf *pf) commitDeletedDecisions() error { method commitAddedDecisions (line 144) | func (pf *pf) commitAddedDecisions() error { method Delete (line 175) | func (pf *pf) Delete(decision *models.Decision) error { method ShutDown (line 180) | func (pf *pf) ShutDown() error { constant pfctlCmd (line 25) | pfctlCmd = "/sbin/pfctl" constant pfDevice (line 26) | pfDevice = "/dev/pf" function NewPF (line 29) | func NewPF(config *cfg.BouncerConfig) (types.Backend, error) { function execPfctl (line 59) | func execPfctl(anchor string, arg ...string) *exec.Cmd { FILE: pkg/pf/pf_context.go type pfContext (line 17) | type pfContext struct method checkTable (line 76) | func (ctx *pfContext) checkTable() error { method shutDown (line 97) | func (ctx *pfContext) shutDown() error { method add (line 150) | func (ctx *pfContext) add(decisions []*models.Decision) error { method delete (line 208) | func (ctx *pfContext) delete(decisions []*models.Decision) error { method init (line 227) | func (ctx *pfContext) init() error { constant backendName (line 24) | backendName = "pf" function decisionsToIPs (line 26) | func decisionsToIPs(decisions []*models.Decision) []string { function writeIPsToFile (line 40) | func writeIPsToFile(ips []string) (string, error) { function getStateIPs (line 109) | func getStateIPs() (map[string]bool, error) { FILE: pkg/types/types.go type Backend (line 7) | type Backend interface FILE: test/tests/backends/iptables/test_iptables.py class TestIPTables (line 26) | class TestIPTables(unittest.TestCase): method setUp (line 27) | def setUp(self): method tearDown (line 33) | def tearDown(self): method test_table_rule_set_are_created (line 38) | def test_table_rule_set_are_created(self): method test_duplicate_decisions_across_decision_stream (line 78) | def test_duplicate_decisions_across_decision_stream(self): method test_decision_insertion_deletion_ipv4 (line 101) | def test_decision_insertion_deletion_ipv4(self): method test_decision_insertion_deletion_ipv6 (line 120) | def test_decision_insertion_deletion_ipv6(self): method test_longest_decision_insertion (line 144) | def test_longest_decision_insertion(self): function get_set_elements (line 165) | def get_set_elements(set_name, with_timeout=False): class TestIPTablesLogging (line 178) | class TestIPTablesLogging(unittest.TestCase): method setUp (line 179) | def setUp(self): method tearDown (line 185) | def tearDown(self): method testLogging (line 190) | def testLogging(self): FILE: test/tests/backends/mock_lapi.py class DataStore (line 14) | class DataStore: method __init__ (line 15) | def __init__(self) -> None: method insert_decisions (line 20) | def insert_decisions(self, decisions): method delete_decisions_by_ip (line 30) | def delete_decisions_by_ip(self, ip): method delete_decision_by_id (line 35) | def delete_decision_by_id(self, id): method update_bouncer_pull (line 41) | def update_bouncer_pull(self, api_key): method get_active_and_expired_decisions_since (line 44) | def get_active_and_expired_decisions_since(self, since): method get_decisions_for_bouncer (line 57) | def get_decisions_for_bouncer(self, api_key, startup=False): method get_decision_expiry_time (line 68) | def get_decision_expiry_time(decision): class MockLAPI (line 72) | class MockLAPI: method __init__ (line 73) | def __init__(self) -> None: method decisions (line 82) | def decisions(self): method start (line 93) | def start(self, port=8081): method stop (line 97) | def stop(self): function formatted_decisions (line 101) | def formatted_decisions(decisions): class ServerThread (line 123) | class ServerThread(Thread): method __init__ (line 124) | def __init__(self, app, port=8081): method run (line 130) | def run(self): method shutdown (line 133) | def shutdown(self): FILE: test/tests/backends/nftables/test_nftables.py class TestNFTables (line 18) | class TestNFTables(unittest.TestCase): method setUp (line 19) | def setUp(self): method tearDown (line 25) | def tearDown(self): method test_table_rule_set_are_created (line 32) | def test_table_rule_set_are_created(self): method test_duplicate_decisions_across_decision_stream (line 67) | def test_duplicate_decisions_across_decision_stream(self): method test_decision_insertion_deletion_ipv4 (line 95) | def test_decision_insertion_deletion_ipv4(self): method test_decision_insertion_deletion_ipv6 (line 114) | def test_decision_insertion_deletion_ipv6(self): method test_longest_decision_insertion (line 137) | def test_longest_decision_insertion(self): function get_set_elements (line 158) | def get_set_elements(family, table_name, set_name, with_timeout=False): FILE: test/tests/backends/utils.py function run_cmd (line 5) | def run_cmd(*cmd, ignore_error=False, shell=False): function generate_n_decisions (line 13) | def generate_n_decisions(n: int, action="ban", dup_count=0, ipv4=True, d... function new_decision (line 39) | def new_decision(ip: str): FILE: test/tests/bouncer/test_firewall_bouncer.py function test_backend_mode (line 4) | def test_backend_mode(bouncer, fw_cfg_factory): function test_api_url (line 44) | def test_api_url(crowdsec, bouncer, fw_cfg_factory): function test_api_key (line 68) | def test_api_key(crowdsec, bouncer, fw_cfg_factory, api_key_factory, bou... FILE: test/tests/bouncer/test_iptables_deny_action.py function test_iptables_deny_action (line 1) | def test_iptables_deny_action(bouncer, fw_cfg_factory): FILE: test/tests/bouncer/test_tls.py function test_tls_server (line 4) | def test_tls_server(crowdsec, certs_dir, api_key_factory, bouncer, fw_cf... function test_tls_mutual (line 56) | def test_tls_mutual(crowdsec, certs_dir, api_key_factory, bouncer, fw_cf... function test_api_key_and_cert (line 120) | def test_api_key_and_cert(crowdsec, certs_dir, api_key_factory, bouncer,... FILE: test/tests/bouncer/test_yaml_local.py function test_yaml_local (line 4) | def test_yaml_local(bouncer, fw_cfg_factory): FILE: test/tests/conftest.py function bouncer_under_test (line 11) | def bouncer_under_test(): function bouncer_with_lapi (line 18) | def bouncer_with_lapi(bouncer, crowdsec, fw_cfg_factory, api_key_factory... function fw_cfg_factory (line 54) | def fw_cfg_factory(): FILE: test/tests/install/no_crowdsec/test_no_crowdsec_deb.py function test_deb_install_purge (line 9) | def test_deb_install_purge(deb_package_path, bouncer_under_test, must_be... FILE: test/tests/install/no_crowdsec/test_no_crowdsec_scripts.py function test_install_no_crowdsec (line 13) | def test_install_no_crowdsec(project_repo, bouncer_binary, must_be_root): function test_upgrade_no_crowdsec (line 44) | def test_upgrade_no_crowdsec(project_repo, must_be_root): function test_uninstall_no_crowdsec (line 59) | def test_uninstall_no_crowdsec(project_repo, must_be_root): FILE: test/tests/install/with_crowdsec/test_crowdsec_deb.py function test_deb_install_purge (line 15) | def test_deb_install_purge(deb_package_path, bouncer_under_test, must_be... function test_deb_install_purge_yaml_local (line 75) | def test_deb_install_purge_yaml_local(deb_package_path, bouncer_under_te... FILE: test/tests/install/with_crowdsec/test_crowdsec_scripts.py function test_install_crowdsec (line 15) | def test_install_crowdsec(project_repo, bouncer_binary, must_be_root): function test_upgrade_crowdsec (line 56) | def test_upgrade_crowdsec(project_repo, must_be_root): function test_uninstall_crowdsec (line 71) | def test_uninstall_crowdsec(project_repo, must_be_root): FILE: test/tests/pkg/test_build_deb.py function test_deb_build (line 8) | def test_deb_build(deb_package, skip_unless_deb): FILE: test/tests/pkg/test_build_rpm.py function test_rpm_build (line 6) | def test_rpm_build(rpm_package, skip_unless_rpm): FILE: test/tests/pkg/test_scripts_nonroot.py function test_scripts_nonroot (line 5) | def test_scripts_nonroot(project_repo, bouncer_binary, must_be_nonroot):