mirror of
https://github.com/luzifer-docker/personal-dns.git
synced 2024-11-09 18:20:02 +00:00
Add local whitelist to unblock entries
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
0f43ce3f5a
commit
aa67f4235a
4 changed files with 19 additions and 3 deletions
|
@ -5,6 +5,7 @@ WORKDIR /src
|
|||
|
||||
RUN set -ex \
|
||||
&& apk --no-cache add \
|
||||
bash \
|
||||
curl \
|
||||
git \
|
||||
make \
|
||||
|
|
4
Makefile
4
Makefile
|
@ -1,6 +1,4 @@
|
|||
default:
|
||||
|
||||
blacklist:
|
||||
curl -sSfL https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | awk '/^(#.*|0.0.0.0.*|)$$/' > blacklist
|
||||
# Add local blacklist
|
||||
cat blacklist.local >> blacklist
|
||||
bash build_blacklist.sh
|
||||
|
|
16
build_blacklist.sh
Normal file
16
build_blacklist.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
target=blacklist
|
||||
|
||||
# Download compiled blacklist
|
||||
curl -sSfL https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | awk '/^(#.*|0.0.0.0.*|)$$/' >${target}
|
||||
|
||||
# Remove entries on local whitelist
|
||||
for entry in $(cat whitelist.local); do
|
||||
grep -v "${entry}" ${target} >${target}.tmp
|
||||
mv ${target}.tmp ${target}
|
||||
done
|
||||
|
||||
# Add local blacklist
|
||||
cat blacklist.local >>${target}
|
1
whitelist.local
Normal file
1
whitelist.local
Normal file
|
@ -0,0 +1 @@
|
|||
app.pr0gramm.com
|
Loading…
Reference in a new issue