generate_blocklist: make URLs configurable
This commit is contained in:
parent
bb7c360eff
commit
9dca8f1a89
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@
|
||||||
/worker
|
/worker
|
||||||
/config.json
|
/config.json
|
||||||
/blocklist.txt
|
/blocklist.txt
|
||||||
|
/blocklist_config.sh
|
|
@ -5,10 +5,12 @@ function import_hosts() {
|
||||||
curl "$url" | sed '/^#/d' | sed 's/0.0.0.0 //g' | sed 's/127.0.0.1 //g' | grep '\S'
|
curl "$url" | sed '/^#/d' | sed 's/0.0.0.0 //g' | sed 's/127.0.0.1 //g' | grep '\S'
|
||||||
}
|
}
|
||||||
|
|
||||||
URLS=(
|
# In blocklist_config, put a list of URLs to shared ad-blocking hosts files
|
||||||
"https://someonewhocares.org/hosts/zero/hosts"
|
# e.g.
|
||||||
"https://adaway.org/hosts.txt"
|
# URL=(
|
||||||
)
|
# "https://some-domain/hosts"
|
||||||
|
#)
|
||||||
|
. ./blocklist_config.sh
|
||||||
|
|
||||||
echo "" > blocklist.txt
|
echo "" > blocklist.txt
|
||||||
for url in ${URLS[@]}; do
|
for url in ${URLS[@]}; do
|
||||||
|
|
Loading…
Reference in a new issue