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