Implementing parental controls on websites using java

I want to encode a standalone application in java to control access to restricted sites, while children use the Internet when there are no parents. The basic idea is to block adult / unwanted websites based on who is browsing. The use case is as follows:

1. The user opens a browser. 2.Our application (which runs in the background) should open an authentication window and ask the user to enter a password. 3. Based on the entered password, the application identifies the user as an adult or a child. 4. If an adult, there will be no restrictions on websites. 5. If a child, then the following things should happen: (a) All the requested URLs from the browser must be logged in the log file. (b) Adult / unwanted websites should be blocked from opening and a warning page should be displayed in the browser.

My question is: can this application be implemented in java? If so, how? How can I track responses and filter them based on my conditions? I thought this was possible using socket programming in java.

Any help is appreciated.

+3
source share
1 answer

Well, you could write an HTTP proxy in Java, and that will probably work fine ... until your children are old enough to figure out how to change the proxy server in their browser.

Of course, you will need to determine what is considered an “adult / unwanted website” that has historically proven difficult ... whitelisting might be the easiest way here.

I would not be surprised to hear that such things already exist. Writing a reliable HTTP proxy (including streaming, etc.) can be difficult. Far from impossible, but probably not very useful to use your time if you do not want to do this for educational value.

+3
source

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


All Articles