I want to use 1 port for both unencrypted TCP and SSL.
The goal is to make 1 port of entry to the machine. This means that mux has all the protocols and transports in the port. For example, I look at the first 4 bytes of a stream. If it starts with "GET", "POST", "HEAD", etc. I know this is the HTTP protocol, so I am transferring a connection to an HTTP server. If it is "HELO" or "EHLO", I know to pass it to the SMTP server.
The problem is what I'm looking for if this is an SSL connection (to pass it OpenSSL)?
source share