We need a daemon listening diverted SSL traffic
This daemon should get TLS SNI information from related socket when the first client's handshake hello packet comes. Then daemon will send captured domain name to shell script.
divert socket howto
[login to view URL]
We need c network programming expert.