2

What .NET class/methods could I use to write a simple HTTP(s) proxy that would run on my PC that would:

  • Proxy all HTTP(S) requests through it
  • Let me get bandwidth used per proxy'ed request (e.g. content length)
  • Let me get requesting application or process name per proxied request
  • Ability to proxy/stream the requests on through to my normal proxy server (server name, port, username, password)
John Saunders
  • 160,644
  • 26
  • 247
  • 397
Greg
  • 34,042
  • 79
  • 253
  • 454
  • FWIW I believe this a reverse-proxy you are looking for. If you don't plan to distribute the requests to multiple interior servers I don't see why you couldn't achieve all of this with a simple HTTP module. – Chris Marisic Mar 31 '10 at 19:03
  • hey Chris - what do you mean? Is there something you have in mind I can look at? Like pound or squid in reverse proxy mode? – Greg Apr 01 '10 at 01:05

1 Answers1

0

You want to do this on the client side, right?

I think that WebRequest is probably what you are looking for. As far as how to hook it in to the OS... that's a different question.

  • I think some clarification could be added to the question, from what I took it the OP meant was to track the bandwidth consumed from actions that clients invoke from his server. – Chris Marisic Mar 31 '10 at 19:47
  • That's correct Chris - but everything is on the one pc, ie both the clients that use Internet bandwidth that I want tot track, and the target location for the software I want to build to track it – Greg Mar 31 '10 at 21:09
  • Re webrequest, this might be part of it I guess, however the software needs to listen to new requests and then chain/pass them on, ie proxy, as well – Greg Mar 31 '10 at 21:10