23 lines
718 B
Bash
23 lines
718 B
Bash
#!/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 |