使用delphi屏蔽网站

发布于 2024-09-17 05:47:03 字数 360 浏览 9 评论 0原文

我对当地学校的程序启动器进行了编程,该程序允许学生使用老师提供的随机生成的密钥上网。这是通过将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

冷夜 2024-09-24 05:47:03

不要走DIY路径 - 使用具有黑名单/白名单功能的代理,您还可以设置一个“透明代理”,所有互联网流量都通过该代理进行路由,并且不需要在浏览器中设置代理。您还可以使用代理身份验证来设置谁可以访问哪些内容。
在 Delphi 中,您最终将编写具有相同功能的代理。如果您没有一个很好的 rason 来编写自己的代理,那么最好采用现有的解决方案,该解决方案也已经过很多用户的测试。有商业的和开源/免费的。


如果您确实喜欢在 Delphi 中编写代理:

  • 需要充分了解 TCP、HTTP(S) 和代理的工作原理。
  • 应用程序需要是一种服务,并且应该是健壮的,否则访问互联网可能变得不可能。
  • 应用程序必须服务并发请求,因此它需要是多线程的(Indy 提供了一个基本的 HTTP 代理组件 - 我不知道它的扩展性如何,并且它仅实现基本功能)。
  • 如果您需要身份验证,请了解身份验证方法,如果需要集成身份验证,请了解 Windows 身份验证的工作原理。
    • 应使用所有使用的浏览器类型对其进行测试。

虽然如果您想了解这一切,那么从头开始编写是一个非常有趣的应用程序,但如果您有“业务需求”,最好使用现有的应用程序。

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:

  • 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.

暮年慕年 2024-09-24 05:47:03

+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!

巴黎夜雨 2024-09-24 05:47:03

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文