From 3a84de484181cd41517288ed43db2d2ca37407cc Mon Sep 17 00:00:00 2001 From: kev Date: Wed, 28 Feb 2024 10:58:21 +0800 Subject: [PATCH] update ftldns --- ftldns/Dockerfile | 3 ++- ftldns/Dockerfile.debian | 3 ++- ftldns/README.md | 19 +++++++++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ftldns/Dockerfile b/ftldns/Dockerfile index 35a09d7..843cac9 100644 --- a/ftldns/Dockerfile +++ b/ftldns/Dockerfile @@ -20,10 +20,11 @@ RUN set -xe \ && cd /opt/pihole \ && curl -sSL -O ${FTL_GIT}/pi-hole/raw/master/advanced/Scripts/list.sh \ -O ${FTL_GIT}/pi-hole/raw/master/advanced/Scripts/utils.sh \ + -O ${FTL_GIT}/pi-hole/raw/master/advanced/Scripts/chronometer.sh \ -O ${FTL_GIT}/pi-hole/raw/master/advanced/Scripts/COL_TABLE \ && cd /usr/local/bin \ && curl -sSL ${FTL_GIT}/pi-hole/raw/master/pihole -o /usr/local/bin/pihole \ - && chmod +x /usr/local/bin/pihole /opt/pihole/list.sh \ + && chmod +x /usr/local/bin/pihole /opt/pihole/*.sh \ && apk del curl VOLUME /etc/pihole diff --git a/ftldns/Dockerfile.debian b/ftldns/Dockerfile.debian index fa27123..b64828a 100644 --- a/ftldns/Dockerfile.debian +++ b/ftldns/Dockerfile.debian @@ -21,10 +21,11 @@ RUN set -xe \ && cd /opt/pihole \ && curl -sSL -O ${FTL_GIT}/pi-hole/raw/master/advanced/Scripts/list.sh \ -O ${FTL_GIT}/pi-hole/raw/master/advanced/Scripts/utils.sh \ + -O ${FTL_GIT}/pi-hole/raw/master/advanced/Scripts/chronometer.sh \ -O ${FTL_GIT}/pi-hole/raw/master/advanced/Scripts/COL_TABLE \ && cd /usr/local/bin \ && curl -sSL ${FTL_GIT}/pi-hole/raw/master/pihole -o /usr/local/bin/pihole \ - && chmod +x /usr/local/bin/pihole /opt/pihole/list.sh \ + && chmod +x /usr/local/bin/pihole /opt/pihole/*.sh \ && apt remove -y curl \ && rm -rf /var/lib/apt/lists/* diff --git a/ftldns/README.md b/ftldns/README.md index dd0a687..77e4897 100644 --- a/ftldns/README.md +++ b/ftldns/README.md @@ -15,17 +15,24 @@ $ docker compose exec ftldns bash .schema domainlist insert into domainlist(type, domain) values (3, '(\.|^)youtube\.com$'); .quit ->>> pihole-FTL regex-test www.youtube.com - Checking domain against blacklist... - (\.|^)youtube\.com$ matches (regex blacklist, DB ID 1) - Time: 0.019 msec ->>> pihole -b --regex '(\.|^)baidu\.com$' +>>> pihole --regex '(\.|^)baidu\.com$' +>>> pihole --wild 'qq.com' >>> pihole-FTL regex-test www.baidu.com +>>> pihole --wild -d youtube.com +>>> pihole --regex -l +Displaying regex blacklist: + 1: (\.|^)baidu\.com$ (enabled, last modified Tue, 27 Feb 2024 11:17:59 +0000) + 2: (\.|^)qq\.com$ (enabled, last modified Tue, 27 Feb 2024 11:22:17 +0000) +>>> pihole -c +|¯¯¯(¯)_|¯|_ ___|¯|___ Core: API Offline +| ¯_/¯|_| ' \/ _ \ / -_) +|_| |_| |_||_\___/_\___| + —————————————————————————————————————————————————————————— >>> exit $ docker compose kill -s RTMIN ftldns -$ dig @127.0.0.1 -p 53 www.youtube.com +$ dig @127.0.0.1 -p 53 www.baidu.com $ telnet 127.0.0.1 4711 >version