Using Scala 2.10 and Akka 2.3.4, I put together a simple proxy server that accepts incoming TCP connections and then proxies these messages to a remote server. Everything works with plain text, but I'm stuck in SSL.
In short, this is how I start my insecure server for incoming connections:
val server = system.actorOf(Props(new LegacyTCPServer), name = "my-tcp-server") implicit val bindingTimeout = Timeout(1.second) import system.dispatcher
I can connect to this server via telnet, but now I want to move no to opensl. I assume that there must be some configuration parameters for this, but I cannot parse them from the documentation: http://doc.akka.io/docs/akka/2.3.4/scala.html
I saw some (non-functional) examples using akka 2.2.x that use TCPPipelineHandler, for example,
https://groups.google.com/forum/#!topic/akka-user/auErrrk9wS0
https://github.com/betehess/ping-pong-bot/blob/master/app/ircbot/IrcClient.scala#L183
but TCPPipelineHandler does not seem to exist in akka 2.3.x, so it looks like a dead end.
I would really like it if someone could provide an example of how to configure a tcp socket on ssl using the current versions of Scala and Akka.
Please let me know if you need more information. Thanks!
source share