NAME
adfilter_timeout.pl - sample adblock stack refresh script
SYNOPSIS
sudo launchctl load -w /library/launchdaemons/net.dns.dynamic.adfilter_timeout.plist
DESCRIPTION
This script implements a DNS-based ad blocker. Intended for use as a persistent process, execution is wrapped in a timeout function for the purpose of refreshing the adblock stack.
CAVEATS
It's clunky, but it should work.
Tested on darwin only, using launchctl to handle persistence. It should be possible to run this persistently on unix using daemontools.
net.dns.dynamic.adfilter_timeout.plist:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>net.dns.dynamic.adfilter_timeout</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/adfilter_timeout.pl</string> </array> <key>KeepAlive</key> <true/> <key>RunAtLoad</key> <true/> </dict> </plist>
AUTHOR
David Watson <dwatson@cpan.org>
SEE ALSO
Net::DNS::Dynamic::Adfilter
COPYRIGHT
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.