Commit 7e2fbff0 authored by justcoding121's avatar justcoding121

#463 Call invoke after connect

parent 88c27e0b
...@@ -275,8 +275,6 @@ namespace Titanium.Web.Proxy.Network.Tcp ...@@ -275,8 +275,6 @@ namespace Titanium.Web.Proxy.Network.Tcp
ReceiveBufferSize = proxyServer.BufferSize ReceiveBufferSize = proxyServer.BufferSize
}; };
await proxyServer.InvokeConnectionCreateEvent(tcpClient, false);
// If this proxy uses another external proxy then create a tunnel request for HTTP/HTTPS connections // If this proxy uses another external proxy then create a tunnel request for HTTP/HTTPS connections
if (useUpstreamProxy) if (useUpstreamProxy)
{ {
...@@ -287,6 +285,8 @@ namespace Titanium.Web.Proxy.Network.Tcp ...@@ -287,6 +285,8 @@ namespace Titanium.Web.Proxy.Network.Tcp
await tcpClient.ConnectAsync(remoteHostName, remotePort); await tcpClient.ConnectAsync(remoteHostName, remotePort);
} }
await proxyServer.InvokeConnectionCreateEvent(tcpClient, false);
stream = new CustomBufferedStream(tcpClient.GetStream(), proxyServer.BufferPool, proxyServer.BufferSize); stream = new CustomBufferedStream(tcpClient.GetStream(), proxyServer.BufferPool, proxyServer.BufferSize);
if (useUpstreamProxy && (isConnect || isHttps)) if (useUpstreamProxy && (isConnect || isHttps))
......
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