Commit fce1aa51 authored by Honfika's avatar Honfika

check the EnableSsl property in expliciont enpoint, too

parent 2d885014
...@@ -316,7 +316,7 @@ namespace Titanium.Web.Proxy ...@@ -316,7 +316,7 @@ namespace Titanium.Web.Proxy
bool isHttp = (protocolType & ProxyProtocolType.Http) > 0; bool isHttp = (protocolType & ProxyProtocolType.Http) > 0;
bool isHttps = (protocolType & ProxyProtocolType.Https) > 0; bool isHttps = (protocolType & ProxyProtocolType.Https) > 0;
if (isHttps) if (isHttps)
{ {
if (!endPoint.EnableSsl) if (!endPoint.EnableSsl)
......
...@@ -97,7 +97,12 @@ namespace Titanium.Web.Proxy ...@@ -97,7 +97,12 @@ namespace Titanium.Web.Proxy
await clientStreamWriter.WriteResponseAsync(response); await clientStreamWriter.WriteResponseAsync(response);
var clientHelloInfo = await SslTools.PeekClientHello(clientStream); ClientHelloInfo clientHelloInfo = null;
if (endPoint.EnableSsl)
{
clientHelloInfo = await SslTools.PeekClientHello(clientStream);
}
bool isClientHello = clientHelloInfo != null; bool isClientHello = clientHelloInfo != null;
if (isClientHello) if (isClientHello)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment