443 stream tcp nowait nobody /usr/sbin/tcpd /usr/local/sbin/ssh-https
So how does the ssh-https do its decision?
Well, it's just 23 lines of source code, you'll find out :)
No, honest. It waits for one second for data from the client. If there was data, it's https, and if there was no date, it's the ssh client waiting for the server greeting (I think it is not clearly stated in the RFC whether the client or the server has to greet first, but I found that the clients always waits for the server).
It did work. I'm not running this on my site any more because I don't run
apache-ssl any more nor am I firewalled out anywhere at the moment,