mirror of
https://github.com/tanrax/maza-ad-blocking.git
synced 2024-12-26 10:55:35 +01:00
Add custom dns list
This commit is contained in:
parent
130137a7e8
commit
d9b66ec3fc
12
README.md
12
README.md
@ -163,18 +163,10 @@ maza update
|
||||
|
||||
## 🔒 Alternative DNS list
|
||||
|
||||
By default the Yoyo DNS list (Peter Lowe) is used (3.7k domains blocked). If you want to use another list, like Steven Black's for example (135k domains blocked, incluyed Yoyo DNS list), you must modify the variable in line 7.
|
||||
|
||||
Replace this line:
|
||||
By default the Yoyo (Peter Lowe) DNS list is used (3.7k blocked domains). If you want to use another list, such as Steven Black's for example (with 135k blocked domains), you must add the URL of your list on line 8.
|
||||
|
||||
```
|
||||
URL_DNS_LIST="https://pgl.yoyo.org/adservers/serverlist.php?showintro=0&mimetype=plaintext"
|
||||
```
|
||||
|
||||
with this:
|
||||
|
||||
```
|
||||
URL_DNS_LIST="https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"
|
||||
URL_DNS_LIST_CUSTOM="https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"
|
||||
```
|
||||
|
||||
## DNSMASQ
|
||||
|
9
maza
9
maza
@ -5,6 +5,7 @@ set -e
|
||||
|
||||
# VARIABLES
|
||||
URL_DNS_LIST="https://pgl.yoyo.org/adservers/serverlist.php?showintro=0&mimetype=plaintext"
|
||||
URL_DNS_LIST_CUSTOM=""
|
||||
NAME_OSX="Darwin"
|
||||
THIS_OS=$(uname -mrs)
|
||||
PROGNAME=$(basename "$0")
|
||||
@ -86,13 +87,19 @@ status() {
|
||||
|
||||
update() {
|
||||
|
||||
local local_url_dns_list="$URL_DNS_LIST" # Default
|
||||
if [ -n "$URL_DNS_LIST_CUSTOM" ]; then
|
||||
echo "si"
|
||||
local_url_dns_list="$URL_DNS_LIST_CUSTOM" # Custom
|
||||
fi
|
||||
|
||||
# Make conf folder
|
||||
rm -f "$CONFIG$LIST"
|
||||
rm -f "$CONFIG$LIST_DNSMASQ"
|
||||
mkdir -p "$CONFIG"
|
||||
|
||||
# Download DNS list
|
||||
curl -L -s "$URL_DNS_LIST" -o "$CONFIG$LIST"
|
||||
curl -L -s "$local_url_dns_list" -o "$CONFIG$LIST"
|
||||
## Remove comments
|
||||
### Start with #
|
||||
custom-sed -i.bak '/^#/ d' "$CONFIG$LIST"
|
||||
|
Loading…
Reference in New Issue
Block a user