PDA

View Full Version : Control internet connexion



badboy0017
23rd October 2012, 18:13
Hi everyone,
I am trying to develop an application (C++/Qt preferably for Multi-platform) that allows to control and filter the data stream entering and leaving the network (mainly internet), and to restrict the access of certain URL to be reached in the browser,

Is that possible with Qt?? If not are there libraries that can do this??
Or is there any APIs that I can use to help control the connection on the computer?
Thanks

wysota
23rd October 2012, 19:47
Is that possible with Qt??
Not with just Qt. You have to hook into the system's network stack.

ChrisW67
23rd October 2012, 23:43
to restrict the access of certain URL to be reached in the browser,
This bit seems like a job for an HTTP proxy which you could do in Qt if you don't mind reinventing a wheel (See Squid and Squid Guard for examples). Easily circumvented too.

Filtering and blocking by deep inspection of packet entering/leaving the machine is a more complex affair and inherently platform specific. On Linux you have some tools in the form of NetFilter modules. How you do it on Windows or Mac OSX I'll leave to someone else. Suffice to say this is not Qt territory.

badboy0017
25th October 2012, 18:33
If a want to have a proxy server, the browser must use proxy configuration, or a user can just disable the proxy on the browser and escape to my control!!
Otherwise, how can I create proxy server using Qt??

wysota
25th October 2012, 19:34
If you want to be relatively sure all connections pass through a specific proxy, it is the network router that should be configured to pass all http traffic through the proxy.

badboy0017
27th October 2012, 20:26
Any idea how antivirus do to block access to a list of web sites?? (like Kaspersky has a parental control in it)??
There is a documentation that explain this??

ChrisW67
28th October 2012, 03:22
They either:

force a proxy setting into the common browsers/email programs so they can intercept communication that way, or
hook the Windows network stack in way that allows them to achieve the filtering.


http://stackoverflow.com/questions/6882852/how-to-hook-into-windows-network-events