You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
node:tls: SNICallback, new tls.TLSSocket(socket, {isServer}), and ALPNProtocols not supported #1438
Use case: an intercepting HTTPS proxy that terminates TLS for many hostnames on a single listener, or upgrades a raw socket after an HTTP CONNECT. A fixed-cert tls.createServer({key, cert}) works, but the pieces needed for the multi-host case are missing.
→ SC0001: Property 'TLSSocket' does not exist on type 'typeof import("node:tls")'.
(Equivalently, server.emit("connection", rawSocket) or tls.connect({ socket }) would cover the client side.)
Compiles, then fails at runtime: Uncaught Error: tls.connect option 'ALPNProtocols' has no static lowering — port/host/rejectUnauthorized/ca/servername are the honestly-implemented members of a runtime options record
Server-side ALPNProtocols would be useful too.
Current workaround
Spin up one loopback https.createServer per hostname and pipe the CONNECT socket into it. It works, but it adds an extra hop and costs a listener per host.
Activity
Negotiate ALPN and bound the TLS version in tls.connect and tls.creat…
Support SNICallback in tls.createServer