tornet.yml aktualisiert

This commit is contained in:
olli 2023-10-08 14:24:53 +02:00
parent 04beef742f
commit e7d346c211

View File

@ -405,8 +405,11 @@
block: |
cd /etc/dnscrypt-proxy
touch locked-names-local-whitelist.txt
chmod 660 locked-names-local-whitelist.txt
chown root:sudo locked-names-local-whitelist.txt
# get hosts blocklist from https://github.com/StevenBlack/hosts
g_runcmd wget https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts -O - | grep "^0\.0\.0\.0 " | cut -d" " -f2 | grep "\." | egrep -v '^\.|\.$' >${g_tmp}/blocked-names.txt
g_runcmd wget https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts -O - | grep "^0\.0\.0\.0 " | cut -d" " -f2 | grep "\." | egrep -v '^\.|\.$' | egrep -v -f locked-names-local-whitelist.txt >${g_tmp}/blocked-names.txt
numhosts=$(cat ${g_tmp}/blocked-names.txt | wc -l)
if [ "$numhosts" -gt 50000 ]
then
@ -414,6 +417,9 @@
else
g_echo_error "Not enough lines in hosts blocklist from https://github.com/StevenBlack/hosts"
fi
touch locked-names-local-aditions.txt
chmod 660 locked-names-local-additions.txt
chown root:sudo locked-names-local-additions.txt
[ -s blocked-names-local-additions.txt ] && cat blocked-names-local-additions.txt >>blocked-names.txt
systemctl restart dnscrypt-proxy