1

I am trying to develop one application which can block all urls using win32 api on windows desktop application.
So is there any api or any procedure doing programmatically so that i can block all urls?

4

3 回答 3

1

It's impossible to block just URLs. If you want to make sure no one can access the internet the only way to do this would be to unplug the ethernet cable. (Or whatever is giving you connectivity) Here's why:

  1. Blocking all DNS resolution won't stop someone from accessing http://206.132.84.265/
  2. Blocking port 80 and 443 won't stop someone from accessing a web site hosted on a non-standard port.
  3. Denying access to IE and installation of any other software won't stop someone from downloading a browser that doesn't require to be installed (Like a text browser) and putting it on a thumb drive.
  4. Buying an expensive firewall that blocks HTTP traffic won't be able to stop SSL operating on a non-standard port.

Believe me, back in highschool I worked in a warehouse with a scanner gun and figured out how I could check my email with it (with a little help from my computer at home) since an internet gateway was on the same network.

If you want to block people from surfing the web, disconnect the internet.

于 2009-08-21T06:08:58.020 回答
0

您可以使用 Windows 防火墙协议执行此操作。这是 Microsoft 提供的 API。

对于 Vista,这很简单,但对于 XP,您需要做一些工作,因为没有可用的示例。

于 2009-09-15T05:06:50.973 回答
0

我想你可以使用 Windows 防火墙 API

http://msdn.microsoft.com/en-us/library/Aa366453.aspx

于 2010-06-18T21:35:45.973 回答