1

My first thought was blocking them using AdAway or AFWall, but ironically, an adblock and a firewall are useless

Most of the URLs are pictures. I can easily get their URL

I ask to block it phonewide because my browser doesn't support custom adblocking

Didn't even try adding some lines to the phone Hosts, because my adblock overwrites it.

  • A replacement for the AdAway is very well on the table (if not VPN-based), but for the AfWall, only if it's as lightweight, as well organized, free, and again, not VPN-based
  • My browser is Opera. Not changing that.

In case AdAway can be used: If the URL needs to be a line of a host source, how should it be formatted ?

Thank you ahead

  • 2
    Adaway is not content blocker. It is hosts blocker. You add only hosts (domain names and addresses). It has no capability (AFAIK) to block content sourced from a domain. To block content, you need something granular. In case of a browser, say Firefox, you can use Ublock Origin extension. For apps, I don't know what would work. – Firelord Jun 24 '21 at 22:37
  • Changed the whole thread to put more options on the table –  Jun 25 '21 at 11:26
  • 1
    You can run tinyproxy server on your Android device. It supports FilterURLs option. To force redirect all traffic towards this local server, you can use redsocks2 with http-connect type. Both tools are free and open source. For hints see my answers to Using your Android phone as a proxy server and How to send all internet traffic to a SOCKS5 proxy server in local network?. – Irfan Latif Jun 28 '21 at 23:03
  • Man... Above my level... After reading twice, my brain became barely capable of Installing tinyproxy... Now the rest... All I can do is thank you for the attention and shared knowledge –  Jun 29 '21 at 20:07
  • Can your solution, or another strategy you may know, be adapted to a "script" that AFWall can swallow ? –  Jun 30 '21 at 12:33
  • Yes. You can run the CLI software in a shell script; directly or through AFWall. // Actually it's more complicated than what I wrote. FilterURLs won't work for HTTPS traffic without decryption (MITM) because in the case of SSL/TLS traffic the whole URL is not visible to the proxy. So a transparent intercepting proxy is needed. Without SSL interception only domains can be filtered using proxy. But a simpler approach to filter domains is DNS filtering using hosts file or by running a small DNS server (see example of dnscrypt). – Irfan Latif Jul 03 '21 at 18:56
  • Explanation on transparent HTTPS proxy can be found here and here. – Irfan Latif Jul 03 '21 at 19:02

0 Answers0