tornet.yml aktualisiert
This commit is contained in:
parent
04beef742f
commit
e7d346c211
@ -405,8 +405,11 @@
|
|||||||
block: |
|
block: |
|
||||||
cd /etc/dnscrypt-proxy
|
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
|
# 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)
|
numhosts=$(cat ${g_tmp}/blocked-names.txt | wc -l)
|
||||||
if [ "$numhosts" -gt 50000 ]
|
if [ "$numhosts" -gt 50000 ]
|
||||||
then
|
then
|
||||||
@ -414,6 +417,9 @@
|
|||||||
else
|
else
|
||||||
g_echo_error "Not enough lines in hosts blocklist from https://github.com/StevenBlack/hosts"
|
g_echo_error "Not enough lines in hosts blocklist from https://github.com/StevenBlack/hosts"
|
||||||
fi
|
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
|
[ -s blocked-names-local-additions.txt ] && cat blocked-names-local-additions.txt >>blocked-names.txt
|
||||||
systemctl restart dnscrypt-proxy
|
systemctl restart dnscrypt-proxy
|
||||||
|
Loading…
Reference in New Issue
Block a user