Skip to content

Support dynamically choosing TLS certificates using SNI #140

Description

@pqnet

Describe the feature

SNI allow the server to know the host requested before TLS is negotiated. This allows hosting multiple websites on the same ip/host pair and using a different TLS certificate for each of them.

NodeJs supports this using https://nodejs.org/api/tls.html#serveraddcontexthostname-context (https.Server extends tls.server)

Equivalent Deno method: https://docs.deno.com/api/node/tls/~/Server#method_addcontext_0

Bun reference: https://bun.sh/blog/bun-v1.1.5#bun-serve-now-supports-server-name-indication-sni, https://bun.com/reference/bun/Serve/BaseServeOptions/tls and https://bun.com/reference/node/tls/Server/addContext

A default certificate/key pair must be specified for clients that do not support SNI

Additional information

  • Would you be willing to help implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions