Skip to content

feat: granular Firehol level control (ENABLE_FIREHOL_LEVEL1/2/3) - #88

Merged
wolffcatskyy merged 1 commit into
mainfrom
feat/firehol-granular-levels
Jul 21, 2026
Merged

wolffcatskyy merged 1 commit into
mainfrom
feat/firehol-granular-levels

Conversation

@wolffcatskyy

Copy link
Copy Markdown
Owner

Summary

Closes #83. Previously ENABLE_FIREHOL was an all-or-nothing switch for all three Firehol levels. This adds per-level control:

  • ENABLE_FIREHOL_LEVEL1, ENABLE_FIREHOL_LEVEL2, ENABLE_FIREHOL_LEVEL3
  • Each level flag falls back to the master ENABLE_FIREHOL when unset, so existing configs behave identically.
  • When set, a per-level flag overrides the master for that level only.

Example: enable only level1

ENABLE_FIREHOL=false
ENABLE_FIREHOL_LEVEL1=true

Implementation

  • Each Firehol BlocklistSource now uses its own enabled_key (enable_firehol_level1/2/3).
  • Config.from_env() computes each level from ENABLE_FIREHOL_LEVELn if present, else from the master ENABLE_FIREHOL.
  • .env.example and the --help text updated; VALID_ENABLE_VARS picks up the new keys automatically.

Verification

  • Added 3 unit tests covering default-to-master, per-level override, and master-off behavior.
  • Full suite: 228 passed, 6 skipped.
  • End-to-end check confirms only the enabled level(s) are passed to the importer gate.

Backward compatible — no behavior change for users who only set ENABLE_FIREHOL.

Add per-level enable flags for Firehol that fall back to the master
ENABLE_FIREHOL when unset, so existing configs are unchanged. Fixes
the gap where ENABLE_FIREHOL was all-or-nothing for all 3 levels.

Closes #83
@wolffcatskyy
wolffcatskyy merged commit f06ac5c into main Jul 21, 2026
3 checks passed
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.

Enabling FIREHOL Level1 only

1 participant