Forwarding outgoing connections in C ++

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.

+5
source share
3 answers

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

+5

[ ] [ ], . [drop]. , - winpcap. , , .

, , TUN/TAP. , .

, , . passthrough ++, .

, .

+1

.

Windows, BSD Linux , - .

0
source

All Articles