Is there any way in C ++ for Windows to monitor a program and redirect any outgoing requests that it makes on a particular port? I have a simple C ++ http proxy and want it to be able to automatically redirect all browser requests to port 80 through itself.
An easy way to do this is to create a Windows kernel to capture socket requests and redirect them to your proxy.
Some useful documentation on this subject:
http://www.internals.com/articles/apispy/apispy.htm
Windows Vista , Windows (WFP):
http://www.microsoft.com/whdc/device/network/wfp.mspx
Detours () EasyHook (). API ( Win32, Application).
[ ] [ ], . [drop]. , - winpcap. , , .
, , TUN/TAP. , .
, , . passthrough ++, .
, .
.
Windows, BSD Linux , - .