I am running a secure websocket proxy to a TCP service. This uses a standard http.Server
set up like:
var webserver = http.createServer(
{
key: fs.readFileSync(srv.ssl_key),
cert: fs.readFileSync(srv.ssl_cert),
},
function(request, response) {
response.writeHead(404);
response.end();
},
function(err) {
srv.log(err);
}
);
As you can see, we're already using hilariously undocumented facilities: the options and error handler arguments to http.createServer()
.
The SSL key and cert are regenerated periodically by LetsEncrypt certbot. When this happens, I would like to inject the new key and cert into the webserver without having to regenerate a new one or reinitialize my websocket.
What further undocumented facility will allow me to do this?