HTTPS and OpenVPN on port 443 together
<p>until recently I was using lighttpd + openvpn + sslh, to provide both HTTPS and OpenVPN on port 443. But sslh has some significant issues with passing remote IP address to HTTP server and also it does not work well with Gitlab. So I moved to nginx and now I'm trying to achieve the same functionality with OpenVPN as before.</p>

<p>How to configure nginx to handle incomming HTTPS connections and forward unknown connections to OpenVPN?</p>

<p>I know OpenVPN can do this with HTTPS, but it does not solve problems with passing remote IP address to web server (correct remote IP address is more important for web server than for OpenVPN).</p>

<p>Other way around may be like Websockets do, to let OpenVPN to use HTTP upgrade or similar technique, but I haven't found anything about that in OpenVPN documentation.</p>