How to implement a site filter on Android?

I need to implement something that filters sites on Android devices (for adult sites, etc.) as a uni project, but, unfortunately, they have little knowledge on this issue ... What are the possible solutions? I would be very grateful if someone could just point me in the right direction. Then I can explore further. I just need a generalization of all possible general principles that are applicable for this, I think, and that it would be easier to implement, perhaps.

From my understanding, you can ...

  • use a proxy server and filter there
  • use iptables to block calls on some websites.
  • somehow set dns to point to user dns server / dns server with filter

I think it would be easier to implement it on the client side (maybe iptables), but at least I really would like to know what possibilities exist.

+4
source share
2 answers

The only idea comes to HostTable and the DNS server ,

Content blocking controls are not built into the browser, but with the permission of the superuser, you can filter any URL that you want. This method means that you need to know which URLs you want to block, add them to the host table, and then โ€œsetโ€ the host table on your Android. Take a look at Android using the host table

Also in these Google App Engine and this CO question

0
source

In fact, it will be very difficult to implement on the client side, because to use something like iptable, you will need root on the device. Android is designed in such a way that a regular old application does not interfere with low-level things, such as restricting access to a website. Perhaps it is possible, but it will be a real headache. I think the simplest thing for you is to implement your own DNS server and just filter out all the requests from there.

0
source

Source: https://habr.com/ru/post/1383197/


All Articles