Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit fce1aa5

Browse files
committed
check the EnableSsl property in expliciont enpoint, too
1 parent 2d88501 commit fce1aa5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Titanium.Web.Proxy/ProxyServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public void SetAsSystemProxy(ExplicitProxyEndPoint endPoint, ProxyProtocolType p
316316

317317
bool isHttp = (protocolType & ProxyProtocolType.Http) > 0;
318318
bool isHttps = (protocolType & ProxyProtocolType.Https) > 0;
319-
319+
320320
if (isHttps)
321321
{
322322
if (!endPoint.EnableSsl)

Titanium.Web.Proxy/RequestHandler.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ private async Task HandleClient(ExplicitProxyEndPoint endPoint, TcpClient tcpCli
9797

9898
await clientStreamWriter.WriteResponseAsync(response);
9999

100-
var clientHelloInfo = await SslTools.PeekClientHello(clientStream);
100+
ClientHelloInfo clientHelloInfo = null;
101+
if (endPoint.EnableSsl)
102+
{
103+
clientHelloInfo = await SslTools.PeekClientHello(clientStream);
104+
}
105+
101106
bool isClientHello = clientHelloInfo != null;
102107
if (isClientHello)
103108
{

0 commit comments

Comments
 (0)