我需要使用也有 https 地址的代理连接到 https-url。我的代码就是这样的:
var webRequest = (HttpWebRequest)WebRequest.Create("https://reallywhatsthepoint.com");
var proxy = new WebProxy(new Uri("https://proxyaddress:port"));
webRequest.Proxy = proxy;
WebResponse webResponse = webRequest.GetResponse();
这样做我得到一个众所周知的错误:
ServicePointManager 不支持 https 方案的代理
为简单起见,此处没有凭证代码。不,用户不会将代理更改为 http。
现在有一些提示,这是无法实现的,例如: Microsoft 博客或MSDN 论坛,但这些都有些陈旧,这表明,至少 Chrome 和 Firefox 似乎有解决该问题的方法。
谁能告诉我,如何通过代理访问 https 地址,而代理本身只能通过 https 访问?
ServicePointManager 现在应该可以做到了,有什么发展吗?
谢谢!!