Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: auto-tls for websockets #2800

Draft
wants to merge 2 commits into
base: feat/add-auto-tls
Choose a base branch
from

Conversation

achingbrain
Copy link
Member

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

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

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.
@achingbrain achingbrain requested a review from a team as a code owner November 3, 2024 18:23
@achingbrain achingbrain marked this pull request as draft November 3, 2024 18:23
@achingbrain
Copy link
Member Author

Depends on #2798 and probably some others.

@achingbrain achingbrain changed the base branch from main to feat/add-auto-tls November 6, 2024 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant