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

Analyse regex blacklist #19

Merged
merged 9 commits into from
Mar 9, 2021
Merged

Analyse regex blacklist #19

merged 9 commits into from
Mar 9, 2021

Conversation

yubiuser
Copy link
Owner

This adds the new option -r which will analyse blacklist regex as well. It first creates a list of all visited domains (from pihole-FTL.db) and then checks each domain against all regex. Output is a table with all regex blacklist and the number of visited domains that would have been been blocked by this regex.

Note Depending on the amount of visited domains, the number of regex entries and the hardware/CPU this calculation needs some time (were talking about minutes!). This is also the reason users need to enable regex analysis manually and they are off by default.

Note 2 The Pi-hole's regex engine can do some very fancy stuff (e.g. blocking based on the query type). The internal test (pihole-FTL regex-test) can not test for all those rules as it only takes the domain into consideration. There might be more edge cases that are not covered by this test. Therefor, the number of covered domains by some regex might be understimated.

@yubiuser yubiuser merged commit 88553cb into master Mar 9, 2021
@yubiuser yubiuser deleted the new/regex branch March 9, 2021 09:04
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.

1 participant