sh11
October 16, 2021, 9:04am
1
I am want to block ads on openwrt router, but I prefer to download code instead of using external device device.
So, how can I do this and where Can I find this code ?
sh11
October 16, 2021, 10:40am
3
adblock didn't block ad on youtube, I need a code or using iptables to block all ads including youtube.
It is not possible to completely block YouTube ads with DNS-based content filter.
This requires a browser-based content filter like uBlock Origin.
I want an YT adblocker - #10 by tmomas
1 Like
There is a WIP of AdGuardTeam about a content filter proxy.
It is more a POC like than a ready to use tool but it may be good to know…
Here is my own test feedback on OpenWrt ;
opened 01:09PM - 13 Jul 21 UTC
closed 05:09PM - 13 Jul 21 UTC
```
2021/07/13 13:04:01 [error] id=100260-1: failed to handshake with the clien… t: remote error: tls: bad certificate
```
Build with :
```
git clone https://github.com/AdguardTeam/urlfilter
cd urlfilter/cmd
go build -o adguard
```
Certificate generation with :
```
root@ultra:~/AdGuard# opkg install openssl-util
root@ultra:~/AdGuard# openssl genrsa -out root.key 2048
root@ultra:~/AdGuard# openssl req -new -x509 -key root.key -out root.crt
```
Have add root.crt in Firefox...
```
curl http://filters.adtidy.org/extension/android-content-blocker/filters/2.txt > adguard_base.txt
curl http://filters.adtidy.org/extension/android-content-blocker/filters/3.txt > adguard_tracking_protection.txt
curl http://filters.adtidy.org/extension/android-content-blocker/filters/4.txt > adguard_social.txt
```
Started with :
```
./adguard -l 0.0.0.0 -p 8080\
-c root.crt\
-k root.key\
-f adguard_base.txt\
-f adguard_tracking_protection.txt\
-f adguard_social.txt
```
...
```
2021/07/13 12:45:49 [info] starting proxy
2021/07/13 12:45:56 [info] Initializing the proxy server:
Listen addr: 0.0.0.0:8080
MITM status: true
Run as HTTPS proxy: false
API host: adguard
Filter lists: 3
0: adguard_base.txt
1: adguard_tracking_protection.txt
2: adguard_social.txt
2021/07/13 12:45:56 [info] start listening to [::]:8080
```
But I get errors;
```
2021/07/13 13:04:27 [error] id=100275-1: failed to handshake with the client: remote error: tls: bad certificate
2021/07/13 13:04:31 [error] id=100278-1: failed to handshake with the client: remote error: tls: bad certificate
2021/07/13 13:04:33 [error] id=100279-1: failed to handshake with the client: remote error: tls: bad certificate
```
And my surfing is still very 'incomplete' !
I also install the https://github.com/FelisCatus/SwitchyOmega in FireFox.
I configured the IP : 8080 to all protocols (HTTP/HTTPS...)
Then tried Youtube...
With partly success; I access but get no video and some more errors ;
```
2021/07/13 13:01:10 [error] id=100150-1: failed to handshake with the client: remote error: tls: bad certificate
2021/07/13 13:01:12 [error] id=100146-1-1-1: failed to round trip: x509: certificate is not valid for any names, but wanted to match r5---sn-h5q7knel.googlevideo.com
2021/07/13 13:01:12 [info] id=100146-1-1-1: adding r5---sn-h5q7knel.googlevideo.com to invalid TLS hosts due to: x509: certificate is not valid for any names, but wanted to match r5---sn-h5q7knel.googlevideo.com
2021/07/13 13:01:12 [error] id=100147-1-1-1: failed to round trip: x509: certificate is not valid for any names, but wanted to match r5---sn-h5q7knel.googlevideo.com
2021/07/13 13:01:12 [info] id=100147-1-1-1: adding r5---sn-h5q7knel.googlevideo.com to invalid TLS hosts due to: x509: certificate is not valid for any names, but wanted to match r5---sn-h5q7knel.googlevideo.com
2021/07/13 13:01:16 [error] id=100156-1: failed to handshake with the client: remote error: tls: bad certificate
```
1 Like
sh11
October 18, 2021, 11:22am
6
how can I block this site using iptables commands:
r12.sn-q4flrne6.googlevideo.com
frollic
October 18, 2021, 11:55am
7
pretty sure iptables work with IPs, not host names ....
1 Like
system
Closed
October 28, 2021, 11:55am
8
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.