开发者

.NET - Is it possible to proxy a HTTPS request using HttpListener & HttpWebRequest? (or is it not possbile due to the encryption?)

开发者 https://www.devze.com 2022-12-26 05:11 出处:网络
Question - Is it possible to proxy a HTTPS request using HttpListener & HttpWebRequest?(or is it not possbile due to the encryption?)

Question - Is it possible to proxy a HTTPS request using HttpListener & HttpWebRequest? (or is it not possbile due to the encryption?)

I have got a .NET proxy working by using HttpListener & HttpWebRequest using the approach here. I'm trying to extend this at the moment to listen for HTTPS too (refer this question) however I'm wondering if I'm trying to tackle something that is not possible...That is if this code works by listening for the HTTPS request (using HttpListener) and then copying headers & content across to a new HttpWebRequest, is this flawed as it may not be able to decrypt the开发者_C百科 request to get the content?

But then normal proxy servers obviously can proxy HTTPS, so I guess perhaps it will work because it will just copy across the encrypted content?


Probably not if the IP address is different. You could try implementing the X-Forwarded-For in the HTTP GET request, but I doubt that would work.

0

精彩评论

暂无评论...
验证码 换一张
取 消