Add local whitelist to unblock entries

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-08-23 15:11:22 +02:00
parent 0f43ce3f5a
commit aa67f4235a
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E
4 changed files with 19 additions and 3 deletions

View File

@ -5,6 +5,7 @@ WORKDIR /src
RUN set -ex \
&& apk --no-cache add \
bash \
curl \
git \
make \

View File

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

@ -0,0 +1 @@
app.pr0gramm.com