Skip to content
Snippets Groups Projects

bind: Add option to block ads

Closed James Valleroy requested to merge jvalleroy:dns-adblock into master

This PR add DNS-based ad blocking, based on the instructions at https://charlieharvey.org.uk/page/adblocking_with_bind_apache.

When enabled, it fetches a list of ad servers from pgl.yoyo.org. Later we may want to offer several lists that the user can choose from, and allow the list to be download over Tor.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
173 179 conf_file.close()
174 180
175 181
182 def set_adblock(choice):
183 """Enable or disable ad blocking."""
184 data = [line.strip() for line in open(CONFIG_FILE, 'r')]
185 if choice == 'true':
186 # serve a single pixel gif for blocked domains
187 action_utils.webserver_enable('adblock-plinth')
188
189 # fetch ad server list
  • Sunil Mohan Adapa
  • 173 179 conf_file.close()
    174 180
    175 181
    182 def set_adblock(choice):
    183 """Enable or disable ad blocking."""
    184 data = [line.strip() for line in open(CONFIG_FILE, 'r')]
    185 if choice == 'true':
    186 # serve a single pixel gif for blocked domains
    187 action_utils.webserver_enable('adblock-plinth')
    188
    189 # fetch ad server list
    • Created by: JosephKiranBabu

      Also, how about having an /etc/hosts based ad-blocking provided on FreedomBox as a service instead of using Bind or Privoxy, maybe as a feature in the configuration page?

  • Created by: Skjold

    Adblock2Privoxy can perform element blocking with CSS using standard Adblock lists through Privoxy and Apache and has a .deb package available. Not sure yet how to integrate it, though.

  • Please register or sign in to reply
    Loading