From b94a0dc3104c6b411b86f89d94ef8f3feb1a2b82 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Tue, 3 Jun 2025 22:48:17 +0200 Subject: [PATCH] feat: use more extensive blocked hosts source --- hosts/hosts | 43 ------------------------------------------- hosts/install.sh | 5 +++-- 2 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 hosts/hosts diff --git a/hosts/hosts b/hosts/hosts deleted file mode 100644 index 2ad49da..0000000 --- a/hosts/hosts +++ /dev/null @@ -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 \ No newline at end of file diff --git a/hosts/install.sh b/hosts/install.sh index 3b0427d..4c960b8 100755 --- a/hosts/install.sh +++ b/hosts/install.sh @@ -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