使用java在网站上实现家长控制 [英] Implementing parental control on websites using java

查看:209
本文介绍了使用java在网站上实现家长控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在java中编写一个独立的应用程序来控制对受限制网站的访问,而当父母不在时,孩子们会使用互联网。主要想法是根据正在浏览的人阻止成人/不受欢迎的网站。用例如下:

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.用户打开浏览器。
2.我们的应用程序(在后台运行)应弹出一个验证框并要求用户输入密码。
3.根据输入的密码,应用程序会将用户识别为成人或小孩。
4.如果是成人,网站将不受限制。
5.如果是小孩,那么必须发生以下事情:
(a)浏览器中所有请求的URL必须记录在日志文件中。
(b)必须阻止成人/不需要的网站打开,并且必须在浏览器中显示警告页面。

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.

我的问题是:这个应用程序可以在java中实现吗?如果有,怎么样?我如何监控响应并根据我的条件过滤它们?我认为通过在java中使用套接字编程可能是可能的。

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.

赞赏任何形式的帮助。

推荐答案

嗯,你可以用Java编写一个HTTP代理,这可能会正常工作......直到你的孩子长大到想知道如何在他们的浏览器中更改代理。

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.

听到这样的事情已经存在,我不会感到惊讶。自己编写一个健壮的HTTP代理(包括流式传输等)可能会很棘手。这绝不是不可能的,但可能不是很好地利用你的时间,除非你想为教育价值做这件事。

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.

这篇关于使用java在网站上实现家长控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆