libp2p / js-libp2p

The JavaScript Implementation of libp2p networking stack.
https://libp2p.github.io/js-libp2p/
Other
2.34k stars 447 forks source link

feat: auto-tls for websockets #2800

Open achingbrain opened 3 weeks ago

achingbrain commented 3 weeks ago

Starts a tcp server on the listen port and hands connections off to internal http or https servers (depdending on connection type).

Upgrade requests from both servers are handled by a websocket server.

The https server is enabled when either a secure websocket address is listened to explicitly, or when a TLS certificate is provisioned by another libp2p component, likely @libp2p/auto-tls.

This means we don't need to add another port mapping for the https server since we run http and https over the same port.

Change checklist

achingbrain commented 3 weeks ago

Depends on #2798 and probably some others.