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

发布于 2024-08-27 10:44:05 字数 218 浏览 1 评论 0原文

我可以使用什么 .NET 类/方法来编写一个简单的 HTTP(s) 代理,该代理将在我的 PC 上运行,它将:

  • 通过它代理所有 HTTP(S) 请求
  • 让我获取每个代理请求使用的带宽(例如内容长度) )
  • 让我获取每个代理请求的请求应用程序或进程名称
  • 能够将请求代理/流式传输到我的普通代理服务器(服务器名称、端口、用户名、密码)

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故事灯 2024-09-03 10:44:05

您想在客户端执行此操作,对吗?

我认为 WebRequest 可能就是您正在寻找的。至于如何将其连接到操作系统......这是一个不同的问题。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文