HAProxy allows you to do this without requiring an additional tool (sslh). An example can be found here:
https://coolaj86.com/articles/adventures-in-haproxy-tcp-tls-https-ssh-openvpn/
Or perhaps easier to digest
https://blog.chmd.fr/ssh-over-ssl-episode-4-a-haproxy-based-configuration.html
Short: This is achieved is by inspecting the TCP stream, if it starts with SSH-2.0 which conform RFC-4253 ...