Skip to content

Commit

Permalink
Updated to use hostname as when testing the IP was not matching again…
Browse files Browse the repository at this point in the history
…st the whitelist. We don't really need to get the IP until we fail to get a proxy connection also the IP of the returned connection could be different from the IPEndPoint we resolved.
  • Loading branch information
IanLeeClaxton committed Sep 27, 2022
1 parent b1627b7 commit ac21007
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion QuickFIXn/Transport/StreamFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private static Socket CreateTunnelThruProxy(string destIP, int destPort, string
socketThruProxy.Connect(proxyEndPoint);

string proxyMsg = !string.IsNullOrWhiteSpace(destHostName)
? $"CONNECT {destIP}:{destPort} HTTP/1.1\nHost: {destHostName}:{destPort}\n\n"
? $"CONNECT {destHostName}:{destPort} HTTP/1.1\nHost: {destHostName}:{destPort}\n\n"
: $"CONNECT {destIP}:{destPort} HTTP/1.1\n\n";
byte[] buffer = Encoding.ASCII.GetBytes(proxyMsg);
byte[] buffer12 = new byte[500];
Expand Down

0 comments on commit ac21007

Please sign in to comment.