Skip to content

Instantly share code, notes, and snippets.

View delin's full-sized avatar

Denis Yulin delin

View GitHub Profile
@delin
delin / update_block_hosts.sh
Last active April 14, 2018 23:03 — forked from korovamilk/update_hosts.sh
Update Ad-Free /etc/hosts file from public lists
#!/bin/bash
TMP_FILE="$(mktemp)"
HOSTS_FILE="/config/hosts.deny"
DENY_HOSTS_URLS="http://adaway.org/hosts.txt \
http://winhelp2002.mvps.org/hosts.txt \
http://someonewhocares.org/hosts/hosts \
http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts\&showintro=0\&mimetype=plaintext"
EXCLUDE="\.google\.com \
google-analytics\.com \
\.yandex\.ru"