feat: use more extensive blocked hosts source

This commit is contained in:
Krzysztof kuhy Rudnicki 2025-06-03 22:48:17 +02:00
parent 05bbad7e5b
commit b94a0dc310
2 changed files with 3 additions and 45 deletions

View File

@ -1,43 +0,0 @@
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 store.steampowered.com
127.0.0.1 steamcommunity.com
127.0.0.1 help.steampowered.com
127.0.0.1 api.steampowered.com
127.0.0.1 media.steampowered.com
127.0.0.1 cdn.steampowered.com
127.0.0.1 client-download.steampowered.com
127.0.0.1 steampowered.com
127.0.0.1 steamcdn-a.akamaihd.net
127.0.0.1 steamgames.com
127.0.0.1 cdn.akamai.steamstatic.com
127.0.0.1 cdn.cloudflare.steamstatic.com
127.0.0.1 youtube.com
127.0.0.1 www.youtube.com
127.0.0.1 m.youtube.com
127.0.0.1 youtube-nocookie.com
127.0.0.1 www.youtube-nocookie.com
127.0.0.1 s.ytimg.com
127.0.0.1 i.ytimg.com
127.0.0.1 ytimg.com
127.0.0.1 youtu.be
127.0.0.1 s.youtube.com
127.0.0.1 googlevideo.com
127.0.0.1 www.googlevideo.com
# 0.0.0.0 discord.com
# 0.0.0.0 www.discord.com
# 0.0.0.0 discordapp.com
# 0.0.0.0 www.discordapp.com
# 0.0.0.0 cdn.discordapp.com
# 0.0.0.0 cdn.discord.com
# 0.0.0.0 media.discordapp.net
# Block Minecraft download sites
127.0.0.1 minecraft.net
127.0.0.1 www.minecraft.net
127.0.0.1 mojang.com
127.0.0.1 www.mojang.com
127.0.0.1 launcher.mojang.com
127.0.0.1 libraries.minecraft.net
127.0.0.1 files.minecraft.net
# 127.0.0.1 s3.amazonaws.com # If Minecraft uses Amazon S3 for downloads

View File

@ -6,8 +6,9 @@ sudo systemctl enable systemd-resolved
# Remove all attributes from /etc/hosts to allow modifications
sudo chattr -i -a /etc/hosts 2>/dev/null || true
# Copy the hosts file
sudo cp hosts /etc/hosts
# Download the hosts file from StevenBlack's repository
echo "Downloading hosts file from StevenBlack repository..."
sudo curl -o /etc/hosts https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts
# Set restrictive permissions (read-only for owner, no access for group/others)
sudo chmod 600 /etc/hosts