Add regex debugging documentation

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2018-07-17 19:46:53 +02:00
parent 6aa50e78dc
commit 70a4a3e3e1
3 changed files with 28 additions and 1 deletions

View File

@@ -30,6 +30,8 @@
*[GCC]: the GNU compiler collection (compiler system produced by the GNU Project supporting various programming languages)
*[repo]: Repository on GitHub
*[RegEx]: Regular expression
*[Regex]: Regular expression
*[regex]: Regular expression
*[SQLite3]: Database engine that handles an SQL databases in a file
*[ID]: Indentifier
*[SSH]: Secure Shell is a cryptographic network protocol for operating network services securely over an unsecured network

View File

@@ -78,4 +78,14 @@ How should `FTL` reply to blocked queries?
**[More details](blockingmode.md)**
### REGEX_DEBUGMODE
```
REGEX_DEBUGMODE=false|true
```
Controls if *FTL*DNS should print extended details about regex matching into `pihole-FTL.log`.
**[More details](regex/debugging.md)**
{!abbreviations.md!}

View File

@@ -1 +1,16 @@
# Pi-hole Regex debugging mode
# Pi-hole Regex debugging mode
To ease the usage of regular expression filters in *FTL*DNS, we offer a regex debugging mode. Set
```
REGEX_DEBUGMODE=true
```
in your `/etc/pihole/pihole-FTL.conf` and restart `pihole-FTL` to enable or disable this mode.
Once the debugging mode is enabled, each match will be logged to `/var/log/pihole-FTL.log` in the following format:
```
[2018-07-17 17:40:51.304] DEBUG: Regex in line 2 ("((^)|(\.))twitter\.") matches "whatever.twitter.com"
```
The given line number corresponds to the line in the file `/etc/pihole/regex.list`.
Note that validation is only done on the first occurrence of a domain to increase the computational efficiency of *FTL*DNS.
{!abbreviations.md!}