tornet.yml aktualisiert
This commit is contained in:
parent
e7d346c211
commit
9f2a18f28c
14
tornet.yml
14
tornet.yml
@ -405,11 +405,11 @@
|
|||||||
block: |
|
block: |
|
||||||
cd /etc/dnscrypt-proxy
|
cd /etc/dnscrypt-proxy
|
||||||
|
|
||||||
touch locked-names-local-whitelist.txt
|
touch blocked-names-local-whitelist.txt
|
||||||
chmod 660 locked-names-local-whitelist.txt
|
chmod 660 blocked-names-local-whitelist.txt
|
||||||
chown root:sudo locked-names-local-whitelist.txt
|
chown root:sudo blocked-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 '^\.|\.$' | egrep -v -f locked-names-local-whitelist.txt >${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 blocked-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
|
||||||
@ -417,9 +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
|
touch blocked-names-local-aditions.txt
|
||||||
chmod 660 locked-names-local-additions.txt
|
chmod 660 blocked-names-local-additions.txt
|
||||||
chown root:sudo locked-names-local-additions.txt
|
chown root:sudo blocked-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