My windows client program and backend windows server program use various TCP communications between them... in some cases .NET Remoting (binary TCP) and in some cases a custom protocol using plain text bytes with Socket.Listen and Socket.Poll on several ports. (the plain text strings are usually device-specific protocols which get relayed to attached devices)
We have been asked to encrypt the traffic between the client/server. Primarily the text protocol using the sockets, but it would be preferred to encrypt the remoting channel if possible too (could be a single solution or two separate approaches).
We have accomplished this in some cases with VPN or other port forwarding/tunnelling approaches between the client and server using external tools. However, to simplify this for my customers' deployments, is there a straightforward way with Rebex Total Pack .NET to simply encrypt (via SSH or other means) all traffic between my two applications?
I believe I could do this by using the FileServer.Bind(FileServerProtocol.Tunneling) on the server, and have the calling application use the Ssh.StartOutgoingTunnel or StartSocksServer, and mapping the ports. (I assume I also need to change the client to refer to localhost:localport everywhere it makes the connections). Is this the best approach or is there a better/simpler option?
The client talks to multiple "servers". And it is for long running operations so it would need to be able to re-establish the connection in case of a drop out on either side.
Any advice is appreciated.
Thanks!