使用Delphi阻止网站 [英] Using delphi to block websites

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

问题描述

我对本地学校的程序启动器进行编程,使学生可以使用老师提供的随机生成的密钥上网.这是通过将Internet Explorer中的代理更改为Internet和wb过滤器所需的代理来完成的.

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.

香港专业教育学院通过Google进行搜索的两种方法是阻止IE内容顾问中的所有网站,除非那些没有密钥的网站.或者在delphi中创建一个外部代理,程序可以使该代理指向该代理,并且仅允许某些网站访问该代理.

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.

我精通简单的delphi函数,并具有一定的计算水平,但是不知道从何处着手,将不胜感激.

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.

推荐答案

不要走DIY路径-使用具有黑名单/白名单功能的代理,您还可以设置一个透明代理",通过该代理可以访问所有互联网流量已路由,不需要在浏览器中设置代理.您还可以使用代理身份验证来设置谁可以访问什么. 在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.

如果您真的想在Delphi中编写代理:

If you really like to write a proxy in Delphi:

  • 需要对TCP,HTTP(S)和代理如何工作有很好的了解.
  • 该应用程序必须是一种服务,并且应该很健壮,否则可能无法访问Internet.
  • 该应用程序将必须处理并发请求,因此它需要是多线程的(Indy提供了一个基本的HTTP代理组件-我不知道它的扩展程度如何,并且仅实现了基本功能).
  • 如果您需要身份验证,有关身份验证方法的知识以及是否需要集成身份验证,则Windows自动身份验证的工作方式.
    • 应该使用所有使用的浏览器类型进行测试.
    • A good knowledge of how TCP, HTTP(S), and a proxy works is required.
    • The application needs to be a service, and should be robust or accessing the Internet may be become impossible.
    • The application will have to serve concurrent requests, thereby it needs to be multithreaded (Indy offers a basic HTTP proxy component - how well it scales I do not know, and it implements basic features only).
    • If you need authentication, knowledge of authentication methods and if integrated authentication is needed, how Windows auhtentication works.
      • It should be tested with all the browser type used.

      尽管您希望从头开始写一个非常有趣的应用程序,但是如果您有业务需求",最好使用一个已经存在的应用程序.

      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.

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

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