阻止网站访问所有浏览器 [英] Blocking a website from access for all browsers

查看:86
本文介绍了阻止网站访问所有浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,

我想问一下是否有一种方法可以动态阻止网站访问计算机?我的意思是可以(在Java本机接口上)对该功能进行编码吗?

I would like to ask if there's a way to block website(s) from access on a computer(s) dynamically? I mean could this functionality be coded (on java native interface)?

非常感谢您的回复.

谢谢, 西里尔·H.

推荐答案

是的,您可以使用Java编写简单的HTTP代理服务:

Yes, you can code a simple HTTP proxy service with Java:

http://www.java2s.com/Code/Java/Network-Protocol/Asimpleproxyserver.htm

或者,有很多个现有的代理解决方案,它们可能开箱即可满足您的需求:

Alternatively, there are plenty of existing proxy solutions out there might suit your needs out of the box:

http://www.roseindia.net/opensource/freeproxyservers.php

然后,您将配置访问网站(例如,浏览器)的软件/设备以指向该代理,以便所有HTTP通信都通过该代理传递.

You would then configure the software/devices that access websites (e.g., your browser) to point to that proxy, so that all HTTP communication passed through it.

然后,您的代理可以根据您想要编写的任何逻辑,将访问权限限制为您想要的任何URL.

Your proxy could then restrict access to whatever URL(s) you wanted to, based on whatever logic you wanted to code up.

如果您想真正地获得安全感,并且要求人们使用代理(而不是选择绕过代理),则可以这样做,但是考虑到您的问题,这可能比您需要做的更多.

If you wanted to get really fancy/secure and require folks to use the proxy (and not to choose to bypass it), you could do that, but that's probably more than you need to, given your question.

这篇关于阻止网站访问所有浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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