From 25bd6994080a4c136ff8d4bb29654b4bc81bf4a9 Mon Sep 17 00:00:00 2001 From: Tom Date: Sat, 27 Oct 2018 04:34:26 +0800 Subject: [PATCH] Add support for TLS 1/1.2/1.3 in redirector This fixes the `IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.` error upon starting ME3 (Same issue as described [here](https://me3tweaks.com/forums/viewtopic.php?f=10&t=58). This is after re-enabling SSL3 in the "Internet Options" dialog, and enabling the required ciphers through PowerShell. Ran into it on 64-bit Windows 10, build 1803, with .NET 4.7.3 (I think), connecting to a server running on the same machine, listening on a WiFi interface. Everything works beautifully after changing this line. --- ME3Server_WV/ME3Server.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ME3Server_WV/ME3Server.cs b/ME3Server_WV/ME3Server.cs index c576c70..dd3a5a3 100644 --- a/ME3Server_WV/ME3Server.cs +++ b/ME3Server_WV/ME3Server.cs @@ -481,7 +481,7 @@ public static void threadRedirectorListener(object objs) TcpClient tcpClient = RedirectorListener.AcceptTcpClient(); Logger.Log("[Redirector] New client connected", Color.DarkGreen); SslStream clientStream = new SslStream(tcpClient.GetStream(), true); - clientStream.AuthenticateAsServer(RedirectorCert, false, SslProtocols.Ssl3, false); + clientStream.AuthenticateAsServer(RedirectorCert, false, SslProtocols.Ssl3 | SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12, false); Thread tHandler = new Thread(threadRedirectorClientHandler); RedirectorHandlerStruct h = new RedirectorHandlerStruct(); h.stream = clientStream;