在 C# 代理服务器中构建 HTTPS 支持

发布于 2024-08-02 11:05:57 字数 90 浏览 1 评论 0原文

我正在用 C# 构建一个代理服务器,我试图弄清楚如何支持 HTTPS 请求,并阅读它们。您能否推荐一些文章、教程或开源项目,让我可以了解有关如何实现此功能的更多信息?

I am building a proxy server in C# and I am trying to figure out how to support HTTPS requests, and read through them. Can you suggest any articles, tutorials, or open source projects where I can learn more on how to implement this feature?

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

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

发布评论

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

评论(1

飞烟轻若梦 2024-08-09 11:05:57

如果“通读它们”的意思是“解密请求的内容”,那么答案是“你不能”。您所描述的是所谓的“中间人攻击”(MITM)。显然,SSL 受到了保护。

现在,如果您可以使用代理(某种企业环境,或者您正在创建 Fiddler 的竞争对手)控制客户端,则可以通过让客户端信任您的证书来破坏 SSL,然后使用标准 .NET 加密实现 MITM蜜蜂。

附言。有关此方法的优秀示例,请查看带有 Reflector 的 Fiddler。 :)

If by "read through them" you mean "decrypt the contents of the request", the answer is "You can't". What you describe is a so called "man in the middle attack" (MITM). Obviously, SSL is protected from this.

Now, if you have control over the clients using your proxy (some kind of enterprise environment, or you are creating a competitor to Fiddler), you can subvert SSL by making clients trust your certificates, and then implement your MITM using standard .NET crypto APIs.

PS. For an exellent example of this approach, look at Fiddler with Reflector. :)

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