None
FI
One Port to Rule Them All
[]
HTTP Toolkit
You can connect to HTTP Toolkit with TLS, use HTTP/1.1 to open a CONNECT tunnel to a remote server through that, send the remote server a plain text HTTP/1.0 request asking to upgrade, then make your real request with HTTP/2, and you're still just talking to HTTP Toolkit. // Create a real server that'll listen on a real port: const rawServer = new net.Server(); // Create various sub-servers, which will handle the actual // protocols, once we work out which one is relevant: const httpServer = http.createServer(); const http2Server = http2.createServer(); const tlsServer = tls.createServer(tlsConfig); // Sniff and then delegate incoming sockets: rawServer.on('connection', (socket) => { const firstByte = socket.read(1); if (firstByte === 0x16) { tlsServer.emit('connection', socket); } else…