Configure additional socket options
MODIFY
WalletWasabi/Tor/Socks5/TorTcpConnectionFactory.cs
WalletWasabi/Tor/Socks5/TorTcpConnectionFactory.cs
@@ -72,6 +72,9 @@ namespace WalletWasabi.Tor.Socks5
{
tcpClient = new(TorSocks5EndPoint.AddressFamily);
tcpClient.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, true );
+ tcpClient.Client.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.TcpKeepAliveTime, 30);
+ tcpClient.Client.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.TcpKeepAliveInterval, 5);
+ tcpClient.Client.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.TcpKeepAliveRetryCount, 5);
transportStream = await ConnectAsync(tcpClient, cancellationToken).ConfigureAwait(false);
await HandshakeAsync(tcpClient, circuit, cancellationToken).ConfigureAwait(false);

Configure additional socket options