Control incoming / outgoing HTTP traffic with .net

I want to write a small application that can: 1. track the URLs requested through a web browser and / or 2. track the incoming http responses on the local computer.

I do a few googling, but I do not find any clear answers. I think maybe System.Net.Sockets.TCPListener and mess with it, but I get the impression that this is either not what I'm looking for, or I can’t handle both things.

I do not need a detailed step-by-step explanation. Just a short review would be useful (if at all possible), for example (which classes to use, which events to subscribe, any additional information needed to create the necessary objects). I can provide details to Google.

+5
source share
2 answers

Why not just expand Fiddler to suit your needs?

+1
source

You might want to use a utility such as Wireshark (graphic, but not scripted from C #, AFAIK). Wireshare uses a library called WinPcap that actually monitors TCP streams on the computer. Decoding of HTTP headers should be done in your application (this is what wirehark / tcpdump / windump can do). You will need to use PInvoke to invoke the WinPcap library. You can find library wrappers by doing an online search for "WinPcap PInvoke".

:

- .NET HTTP-?

EDIT: , HTTP-

0