.NET HttpListener - 侦听“https://*.8080”时没有流量什么时候设置浏览器代理?
背景 - 我可以让 HttpListener 对于 HTTP 流量正常工作。但是,我在处理 HTTPS 流量时遇到了问题。
问题:如何更改下面的代码,以便我的 HttpListener 实际上能够接收到“https”URL 的浏览器请求?
注意 - 目前 Firefox 的代理设置设置为“localhost: 8080”,当我监听端口 8080 (“https://*:8080/”) 上的流量,并在 Firefox 中输入 HTTPS url 时,我没有收到任何流量? (当我只听 http 并输入正常的 http url 时,它工作正常)
_httpListener = new HttpListener();
_httpListener.Prefixes.Add("https://*:8080/");
_httpListener.Start();
谢谢
Background - I can get HttpListener working fine for HTTP traffic. I'm having trouble with HTTPS traffic however.
QUESTION: How can I change the code below so that a browser request to a "https" URL will actually be picked up by my HttpListener?
Notes - At the moment with firefox's proxy settings set to "localhost:8080", when I listen to traffic on port 8080 ("https://*:8080/"), and I enter a HTTPS url in firefox, I am getting no traffic being picked up? (when I listen to just http and enter normal http url's it works fine)
_httpListener = new HttpListener();
_httpListener.Prefixes.Add("https://*:8080/");
_httpListener.Start();
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
来自 MSDN
虽然不确定100%...
From MSDN
Not sure 100% though...
听起来 Firefox 可能不会像您期望的那样代理 HTTPS 流量。您的 HTTPS 请求是否实际在浏览器中呈现(即使您的 HTTPListener 中没有显示任何流量)?
确保您的 Firefox 浏览器设置为将 SSL 代理到与 HTTP 相同的位置,或者确保选中“将此代理用于所有服务器协议”框。
It sounds like Firefox may not be proxying HTTPS traffic like you expect. Does your HTTPS request actually render in the browser (even though no traffic shows up in your HTTPListener)?
Make sure your Firefox browser is set up to proxy SSL to the same location as HTTP, or else make sure the "Use this proxy for all server protocols" box is checked.
检查固件设置是否通过该端口。
Check the FW settings if it passes that port at all.