> cmux is a generic Go library to multiplex connections based on their payload. Using cmux, you can serve gRPC, SSH, HTTPS, HTTP, Go RPC, and pretty much any other protocol on the same TCP listener.
https://github.com/soheilhy/cmux
https://github.com/yrutschle/sslh
"sslh accepts connections on specified ports, and forwards them further based on tests performed on the first data packet sent by the remote client."