Casper> sslh accepts connections on specified ports, and forwards them further
based on tests performed on the first data packet sent by the remote client.
Interesting, never heard of sslh but I've heard of people using Nginx for this [1].
If tor handshake can be handled by sslh, could the process (of the tor relay) be listening on 127.0.0.1:12345 and publish good relay descriptor as well ?
Have a look at the NoAdvertise and NoListen flags of ORPort [2]:
ORPort 127.0.0.1:12345 NoAdvertise ORPort 1.1.1.1:443 NoListen
[1]: https://www.nginx.com/blog/running-non-ssl-protocols-over-ssl-port-nginx-1-1... [2]: https://2019.www.torproject.org/docs/tor-manual.html.en#ORPort