diff --git a/README.md b/README.md index 651f318..72b2c83 100644 --- a/README.md +++ b/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 diff --git a/maza b/maza index 9e1679a..26b5e73 100755 --- a/maza +++ b/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"