清理代码

跳过证书验证存风险
强制HTTP1.0已知存有兼容性问题
pull/567/head
YFdyh000 5 years ago
parent 3daa8f479c
commit 2d2e4deb82

@ -17,17 +17,7 @@ namespace v2rayN.Base
protected override WebRequest GetWebRequest(Uri address) protected override WebRequest GetWebRequest(Uri address)
{ {
HttpWebRequest request; HttpWebRequest request;
if (address.Scheme == "https") request = (HttpWebRequest)base.GetWebRequest(address);
{
ServicePointManager.ServerCertificateValidationCallback = (a, b, c, d) => { return true; };
request = (HttpWebRequest)base.GetWebRequest(address);
//request.ProtocolVersion = HttpVersion.Version10;
}
else
{
request = (HttpWebRequest)base.GetWebRequest(address);
}
request.Timeout = Timeout; request.Timeout = Timeout;
request.ReadWriteTimeout = Timeout; request.ReadWriteTimeout = Timeout;
//request.AllowAutoRedirect = false; //request.AllowAutoRedirect = false;

Loading…
Cancel
Save