initial
This commit is contained in:
commit
9b405f4fb7
16
Makefile
Normal file
16
Makefile
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
.PHONY: default commit clean
|
||||||
|
|
||||||
|
default: commit
|
||||||
|
|
||||||
|
commit: hosts
|
||||||
|
@echo "Committing changes to the repository..."
|
||||||
|
@git add hosts hosts.txt list.txt
|
||||||
|
@git commit -m "Update hosts file"
|
||||||
|
@git push origin main
|
||||||
|
|
||||||
|
hosts: list.txt
|
||||||
|
./generate.sh > $@
|
||||||
|
cp $@ hosts.txt
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -rf hosts hosts.txt
|
14
generate.sh
Executable file
14
generate.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd -P )"
|
||||||
|
|
||||||
|
HOSTS="$(awk '{ sub(/#.*/,""); if (/\S/) print }' $DIR/list.txt)"
|
||||||
|
|
||||||
|
HOSTS="$(awk '{ sub(/#.*/,""); if (NF) print }' $DIR/list.txt | sort | uniq)"
|
||||||
|
|
||||||
|
for HOST in $HOSTS ; do
|
||||||
|
echo "127.0.0.1 $HOST"
|
||||||
|
done
|
||||||
|
|
17
list.txt
Normal file
17
list.txt
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# sneak.berlin dns blocklist
|
||||||
|
# sneak@sneak.berlin
|
||||||
|
# WTFPL license
|
||||||
|
|
||||||
|
# apple stuff that macOS/iOS don't need to work
|
||||||
|
xp.apple.com
|
||||||
|
pancake.apple.com
|
||||||
|
|
||||||
|
# self explanatory
|
||||||
|
copilot-telemetry.githubusercontent.com
|
||||||
|
|
||||||
|
# nanoleaf light panels constantly and unnecessarily phone home
|
||||||
|
health.nanoleaf.me
|
||||||
|
daemon.nanoleaf.me
|
||||||
|
|
||||||
|
# so sad that mozilla sucks now
|
||||||
|
incoming.telemetry.mozilla.org
|
Loading…
Reference in New Issue
Block a user