teffalump / adblock Goto Github PK
View Code? Open in Web Editor NEWOpenWRT adblock implementation
OpenWRT adblock implementation
Do you have any recommendations on what list to use to block YouTube ads on my router? Default list blocks everything fine except YouTube
I have my router connected to a VPN provider.
Running adblock for the first time:
root@OpenWrt:~# sh /etc/adblock.sh -f
iptables-mod-nat-extra is installed!
Updating config...
HINT: localservice is set to 1
Adblocking (and router DNS) over a VPN may not work
To allow VPN router DNS, manually set localservice to 0
Downloading hosts lists...
As suggested, I then changed
option localservice '1'
to
option localservice '0'
in /etc/config/dhcp
This results in a DNS leak. Can you think of a way around this? What would you recommend?
Installing iptables-mod-nat-extra...
Collected errors:
kernel (= 3.18.17-1-5dcb66d04a38219f7fd91c748f0e9a32) *
15.05 rc3 is 3.18.20
Does this mean I need wait for a updated iptables-mod-nat-extra to get it work?
Would be nice if this were an OpenWrt package. Wouldn't be hard to do if the author is interested.
It seems that the iprange exemptions do not work. At all. I need to look into it.
I downloaded and installed your script per the readme instructions. Everything appears to run fine (minus one "uci: Entry not found" line), but no ads are actually blocked. I checked /etc/config/dhcp and the block.hosts line is there so I don't know what's wrong.
Any ideas on how to troubleshoot? I'm running a persistent OpenVPN connection and all traffic is routed through said connection, if that makes any difference.
I get the following output when toggling the script (in either direction)
root@OpenWrt:/etc# ./adblock.sh -t
Turning on!
Updating config...
uci: Parse error (unterminated ') at line 4, byte 20
Restarting firewall...
Restarting dnsmasq...
Restarting uhttpd...
Restarting cron...
root@OpenWrt:/etc# nano adblock.sh
Hello!
I faced an issue while surfing in Safari with adblock enabled.
Some of sites are not loading, because Safari tries to load 0.0.0.0 or 127.0.0.1 (the endpoint does not matter for Safari actually) and stops load the page because can't load the elements with ads.
A solution is to modify the endpoint IP to the local IP of your router or run a simple web server locally on your mac. But it's not a good solution, because if the ads are placed on https Safari will notify you about the certificate each time and that's annoying.
Firewall on mac is enabled and I was trying to create a rules to reject the connections, but doesn't seem to help.
block return in quick on lo0 proto tcp from 127.0.0.1 to 127.0.0.1 port { http https }
Does anyone know more proper solution?
Thanks
Here is a screenshot from the web inspector http://i.imgur.com/8sXBN1N.png
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.