Implementing parental control on websites using java

夙愿已清 提交于 2019-12-09 18:45:47

问题


I want to code a standalone app in java to control access to restricted websites while kids use internet when parents are not around. The main idea is to block the adult/unwanted websites based on the person who is browsing. The use-case goes like this:

1.The user opens a browser. 2.Our app (which is running in the background) should pop up an authentication box and ask the user to enter a password. 3.Based on the password entered, the app would identify the user as an adult or a kid. 4.If adult, there will be no restriction on websites. 5.If kid, then the following things must happen, (a)All the requested URLs from the browser must be logged in a log file. (b)Adult/unwanted websites must be blocked from opening and a warning page must be displayed in the browser.

My question is: can this app be implemented in java? If yes how? How can i monitor the responses and filter them based my conditions? I thought it might be possible by using socket programming in java.

Help of any kind is appreciated.


回答1:


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

Of course, you'd have to determine what counts as an "adult/unwanted website" which has historically proven tricky... a whitelist may be the easiest approach here.

I wouldn't be surprised to hear that such things already exist. Writing a robust HTTP proxy yourself (including streaming etc) could be tricky. Far from impossible, but probably not a good use of your time unless you wanted to do it for the educational value.



来源:https://stackoverflow.com/questions/4773000/implementing-parental-control-on-websites-using-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!