Skip to content

src,lib: implement experimental DTLS API#63182

Draft
jasnell wants to merge 1 commit intonodejs:mainfrom
jasnell:jasnell/dtls
Draft

src,lib: implement experimental DTLS API#63182
jasnell wants to merge 1 commit intonodejs:mainfrom
jasnell:jasnell/dtls

Conversation

@jasnell
Copy link
Copy Markdown
Member

@jasnell jasnell commented May 8, 2026

Decided to take a short break from the work on QUIC to implement a DTLS API, mostly just for the enjoyment of it. Very experimental at this point but the basic API is there (inspired by the QUIC API work).

The implementation is based on OpenSSL's built-in DTLS support and no other dependencies are required.

DTLS is a datagram-based version of TLS that is used for things like WebRTC and CoAP. It provides similar security guarantees as TLS but is designed to work over UDP instead of TCP.

This shouldn't be considered ready for production but it is a good starting point for experimentation and feedback.

./configure --experimental-dtls
make -j{nproc}
./node --experimental-dtls my-dtls-app.js

Fixes: #61630

Decided to take a short break from the work on QUIC
to implement a DTLS API. Very experimental at this
point but the basic API is there (inspired by the
QUIC API work).

The implementation is based on OpenSSL's built-in
DTLS support and no other dependencies are required.

DTLS is a datagram-based version of TLS that is used
for things like WebRTC and CoAP. It provides similar
security guarantees as TLS but is designed to work over
UDP instead of TCP.

This shouldn't be considered ready for production
but it is a good starting point for experimentation
and feedback.

```bash
./configure --experimental-dtls
make -j{nproc}
./node --experimental-dtls my-dtls-app.js
```

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode:Opus 4.6
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/config
  • @nodejs/gyp
  • @nodejs/loaders
  • @nodejs/startup

@jasnell jasnell requested a review from mcollina May 8, 2026 04:04
@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels May 8, 2026
@jasnell
Copy link
Copy Markdown
Member Author

jasnell commented May 8, 2026

@nodejs/net

Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DTLS

3 participants