使用delphi屏蔽网站
我对当地学校的程序启动器进行了编程,该程序允许学生使用老师提供的随机生成的密钥上网。这是通过将 Internet Explorer 中的代理更改为 Internet 和 wb 过滤器所需的代理来完成的。
随着学校网站和学习资源逐渐转移到异地托管,学生需要互联网密钥才能访问它们。学校想要的是一种在不解锁互联网其余部分的情况下启用这些网站的方法,除非将互联网密钥提供给学生。
我通过谷歌搜索想出的两种方法是阻止 IE 内容顾问中的所有网站,除了那些没有密钥允许的网站。或者在delphi中创建另一个代理,程序可以使ie指向该代理,并且只允许某些网站通过真正的代理。
我对简单的delphi函数相当流利,具有一定的计算水平,但不知道从哪里开始,希望得到任何帮助。
I Program my local schools program launcher which allows students to get on the internet with an randomly generated key provided by a teacher. This is done by changing the proxy in Internet explorer to the one needed for the internet and the wb filter.
With the schools website and learning resources gradually moving to offsite hosting the internet key is needed for the students to access them. What the school would like is a way to enable these websites without unblocking the rest of the internet unless the internet key is given to the student.
The two ways ive come up with doing this by googleing is to block all websites in IE content adviser exept those that are allowed wthout the key. Or to create anouther proxy in delphi which the program can make ie point to and will only allow certain websites through to the real proxy.
I am reasonble fluent in simple delphi functions with an a level in computing but dont have a clue where to start with this and would appreciate any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不要走DIY路径 - 使用具有黑名单/白名单功能的代理,您还可以设置一个“透明代理”,所有互联网流量都通过该代理进行路由,并且不需要在浏览器中设置代理。您还可以使用代理身份验证来设置谁可以访问哪些内容。
在 Delphi 中,您最终将编写具有相同功能的代理。如果您没有一个很好的 rason 来编写自己的代理,那么最好采用现有的解决方案,该解决方案也已经过很多用户的测试。有商业的和开源/免费的。
如果您确实喜欢在 Delphi 中编写代理:
虽然如果您想了解这一切,那么从头开始编写是一个非常有趣的应用程序,但如果您有“业务需求”,最好使用现有的应用程序。
Don't go through the DIY path - use a proxy with blacklist/whitelist functionalities, you can also set up a "transparent proxy" through which all internet traffic is routed and doesn't require to setup the proxy in browsers. You can also use proxy authentication to setup who can access what.
In Delphi you will end up to write a proxy with the same functionalities. If you don't have a very good rason to write your own proxy, it's far better to go through an already existing solutions, which also is already tested by a lot of users. There are commercial and opensource/free ones.
If you really like to write a proxy in Delphi:
Although a very interesting app to write from scratch if you liked to learn about that all, if you have a "business need" it's better to use an already existing one.
+1并且代理可能会缓存一些互联网资源,因此使用这样的工具整个互联网体验会更加流畅。
我建议使用带有 Squid 的 Linux 盒子(一些旧 PC 可以改装成这个),只是为了将你的学生网络与互联网分开。互联网上有很多关于这方面的信息,还有专门的 Linux 发行版:世界各地的很多学校都遇到了同样的问题!
+1 and the proxy may cache some of the Internet resources, so the whole Internet experience will be smoother with such a tool.
I'll recommend using a linux box (some old PC can be revamped into this) with Squid, just to separate your students network to the Internet. There is a lot of info on the Internet about that, and also dedicated linux distributions: a lot of schools around the world had the same problem!
OpenDNS 是最好的起点。把它安装起来,设置所有电脑都使用它,这样就可以解决你的大部分问题。
OpenDNS is the best place to start. Put that up, set all PCs to use it, and that'll take care of most of your problems.