简体   繁体   English

什么.NET类来代理HTTP请求? (并跟踪使用的带宽)

[英]what .NET class to proxy HTTP requests through? (and keep track of bandwidth used)

What .NET class/methods could I use to write a simple HTTP(s) proxy that would run on my PC that would: 我可以使用什么.NET类/方法来编写将在我的PC上运行的简单HTTP(s)代理,该代理将:

  • Proxy all HTTP(S) requests through it 通过它代理所有HTTP(S)请求
  • Let me get bandwidth used per proxy'ed request (eg 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) 能够将请求代理/流传输到我的普通代理服务器(服务器名称,端口,用户名,密码)

You want to do this on the client side, right? 您想在客户端这样做,对吗?

I think that WebRequest is probably what you are looking for. 我认为WebRequest可能正是您想要的。 As far as how to hook it in to the OS... that's a different question. 至于如何将其挂接到操作系统上……这是一个不同的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM