Add 'update_block_list.sh'
This commit is contained in:
parent
4931844f74
commit
4e373ce631
23
update_block_list.sh
Normal file
23
update_block_list.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
cd /etc/dnscrypt-proxy
|
||||
|
||||
# download notracking/hosts-blocklists without git for portability
|
||||
rm master.zip
|
||||
/usr/bin/wget https://github.com/notracking/hosts-blocklists/archive/refs/heads/master.zip -O master.zip
|
||||
rm hosts-blocklists-master/*
|
||||
/usr/bin/unzip -o master.zip
|
||||
|
||||
# download oisd blocklist
|
||||
/usr/bin/wget https://dblw.oisd.nl/ -O hosts-blocklists-master/dnscrypt-proxy/oisd.txt
|
||||
|
||||
# combine unique entries
|
||||
cat hosts-blocklists-master/dnscrypt-proxy/*.txt | uniq -u > blocked-names.txt
|
||||
|
||||
# cleanup downloads
|
||||
rm master.zip hosts-blocklists-master -rf
|
||||
|
||||
# restart DNS resolver to apply new blocklist
|
||||
#systemctl restart dnscrypt-proxy.service
|
||||
|
||||
#/usr/bin/pkill dns
|
||||
#nohup /root/linux-x86_64/dnscrypt-proxy -logf
|
||||
Loading…
Reference in New Issue
Block a user