From cfb7dda708f4f1a07f1ca4a632f7c148b15a2a15 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 15 Jul 2019 20:08:26 +0200 Subject: [PATCH] Add description of hierarchy of regex filters in FTL. Signed-off-by: DL6ER --- docs/ftldns/regex/overview.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/ftldns/regex/overview.md b/docs/ftldns/regex/overview.md index 55bd60689..25e359fa6 100644 --- a/docs/ftldns/regex/overview.md +++ b/docs/ftldns/regex/overview.md @@ -3,6 +3,13 @@ We implement the POSIX Extended Regular Expressions similar to the one used by t Our implementation is light and fast as each domain is only checked once for a match (if you query `google.com`, it will be checked against your RegEx. Any subsequent query to the same domain will not be checked again until you restart `pihole-FTL`). +## Hierarchy of regex filters in *FTL*DNS +*FTL*DNS uses a specific hierarchy to ensure regex filters work as you expect them to. Whitelisting always has higher propriety than blacklisting. +There are two locations where regex filters are important: + +1. On loading the blocking domains form the `gravity` database table, *FTL*DNS skips not only exactly whitelisted domains but also those that match enabled whitelist regex filters. +2. When a queried domain matches a blacklist regex filter, the query will *not* be blocked if the domain *also* matches an exact or a regex whitelist entry. + ## How to use regular expressions for filtering domains *FTL*DNS reads in regular expression filters from the two [`regex` database tables](../../database/gravity/lists.md). To tell *FTL*DNS to reload the list of regex filters, either: