NanoHttpd / nanohttpd

Tiny, easily embeddable HTTP server in Java.
http://nanohttpd.org
BSD 3-Clause "New" or "Revised" License
6.9k stars 1.69k forks source link

Support for SNI (multiple secure domains on one IP) #547

Closed stefan-reich closed 4 years ago

stefan-reich commented 5 years ago

Hi,

as far as I understand, Java 8 supports SNI in SSLServerSocketFactory. I need SNI to work since I have two domains (botcompany.de and agi.blue) - both served directly with NanoHTTPD :)

Java's SNI stuff is just hard to set up (typical overcomplicated Java APIs)...

And NanoHTTPD doesn't seem to have any support for SNI out of the box.

So... has anyone done this before?

stefan-reich commented 4 years ago

I think I'm solving it. Had to make a special class for it.

stefan-reich commented 4 years ago

Yes, it works now!! https://agi.blue | https://botcompany.de - both served from one NanoHTTPD instance and one IP. Mail me if you want to do this too.