Support routing to TLS sockets

Closes #172