1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-08 04:04:42 +02:00

update ftldns

This commit is contained in:
kev 2024-02-28 10:58:21 +08:00
parent fa491f5231
commit 3a84de4841
3 changed files with 17 additions and 8 deletions

View File

@ -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

View File

@ -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/*

View File

@ -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