C++ Website Blocker

How would I go about making a Website Blocker in C++?
Probably can't. You'd want to run all networking through something (like a kernel module) that can cipher through the data to determine what to block. That would probably require at least C.

Much easier ways abound (and safer).
Last edited on
But if it is that difficult in C++, then how do people do it so simply in Java, VB, and Pyhton?
Good question. I may be misunderstand the concept behind modern traffic blocking.
Of course it's possible, but it's more about your network architecture than your language.

Where would you install something like this? I'd suspect that you have a setup like this:
PC with browser ]====[ Router ]====[ Gateway PC ]====[ Modem ]====[ Internet


In this case ]====[ represents an ethernet cable.

You'd have to setup your gateway PC to bridge the two ethernet ports (like a router would), but to also intercept the TCP/UDP packets, perform a check, and filter data. You could write this filter in C++ if you like. You may need to go to a very low level and write a driver to do this for you.

Most likely, it's just easier to implement this in your router if the options are already available there.
Stewbond wrote:
Of course it's possible, but it's more about your network architecture than your language.

Where would you install something like this? I'd suspect that you have a setup like this:
PC with browser ]====[ Router ]====[ Gateway PC ]====[ Modem ]====[ Internet


In this case ]====[ represents an ethernet cable.

You'd have to setup your gateway PC to bridge the two ethernet ports (like a router would), but to also intercept the TCP/UDP packets, perform a check, and filter data. You could write this filter in C++ if you like. You may need to go to a very low level and write a driver to do this for you.

Most likely, it's just easier to implement this in your router if the options are already available there.


I do not understand any of that.
Topic archived. No new replies allowed.