We are trying to build a TCP proxy that can forward to multiple virtual hosts. The idea is that a single IP address can be used to route inbound requests to multiple internal IP addresses. The initial thought was to craft a TCP proxy in two parts, a client that knows what SNI information to provide and a server that can translate the SNI to the appropriate private IP and make a connection.
Communication comes in-bound to the TCP proxy client without any SNI information. The client needs to open a TCP connection populating the SNI so the server can make intelligent decisions on how to route traffic.
It appears this approach requires reading the TLS clienthello and mutating it in flight. We are currently wanting to do this without SSL termination, if possible. Does this approach make sense?