Last active
April 26, 2025 00:55
-
-
Save NotoriousPyro/efaf812936477fd3a4806ced2db778b3 to your computer and use it in GitHub Desktop.
Learn how to use this here: https://pyronexus.com/2017/01/13/blocking-adverts-with-squid-proxy/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
blocklist="http://pgl.yoyo.org/adservers/serverlist.php?hostformat=squid-dstdom-regex&showintro=0&startdate%5Bday%5D=&startdate%5Bmonth%5D=&startdate%5Byear%5D=&mimetype=plaintext" | |
blocklist_savefile="/etc/squid/adblock.list" | |
printf "Retrieving block list... " | |
curl -sSL "$blocklist" > $blocklist_savefile && printf "Done\n\n" | |
printf "Reloading squid... " | |
squid -k reconfigure && printf "Done\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment