mirror of
https://github.com/tanrax/maza-ad-blocking.git
synced 2024-11-23 23:55:41 +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
|
## 🔒 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.
|
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.
|
||||||
|
|
||||||
Replace this line:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
URL_DNS_LIST="https://pgl.yoyo.org/adservers/serverlist.php?showintro=0&mimetype=plaintext"
|
URL_DNS_LIST_CUSTOM="https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"
|
||||||
```
|
|
||||||
|
|
||||||
with this:
|
|
||||||
|
|
||||||
```
|
|
||||||
URL_DNS_LIST="https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## DNSMASQ
|
## DNSMASQ
|
||||||
|
9
maza
9
maza
@ -5,6 +5,7 @@ set -e
|
|||||||
|
|
||||||
# VARIABLES
|
# VARIABLES
|
||||||
URL_DNS_LIST="https://pgl.yoyo.org/adservers/serverlist.php?showintro=0&mimetype=plaintext"
|
URL_DNS_LIST="https://pgl.yoyo.org/adservers/serverlist.php?showintro=0&mimetype=plaintext"
|
||||||
|
URL_DNS_LIST_CUSTOM=""
|
||||||
NAME_OSX="Darwin"
|
NAME_OSX="Darwin"
|
||||||
THIS_OS=$(uname -mrs)
|
THIS_OS=$(uname -mrs)
|
||||||
PROGNAME=$(basename "$0")
|
PROGNAME=$(basename "$0")
|
||||||
@ -86,13 +87,19 @@ status() {
|
|||||||
|
|
||||||
update() {
|
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
|
# Make conf folder
|
||||||
rm -f "$CONFIG$LIST"
|
rm -f "$CONFIG$LIST"
|
||||||
rm -f "$CONFIG$LIST_DNSMASQ"
|
rm -f "$CONFIG$LIST_DNSMASQ"
|
||||||
mkdir -p "$CONFIG"
|
mkdir -p "$CONFIG"
|
||||||
|
|
||||||
# Download DNS list
|
# Download DNS list
|
||||||
curl -L -s "$URL_DNS_LIST" -o "$CONFIG$LIST"
|
curl -L -s "$local_url_dns_list" -o "$CONFIG$LIST"
|
||||||
## Remove comments
|
## Remove comments
|
||||||
### Start with #
|
### Start with #
|
||||||
custom-sed -i.bak '/^#/ d' "$CONFIG$LIST"
|
custom-sed -i.bak '/^#/ d' "$CONFIG$LIST"
|
||||||
|
Loading…
Reference in New Issue
Block a user