Skip to content

feat: implement DAVE end-to-end encryption #10921

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

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

Snazzah
Copy link
Contributor

@Snazzah Snazzah commented Jun 4, 2025

Please describe the changes this PR makes and why it should be merged:

Implements the Discord Audio & Video End-to-End Encryption (DAVE) Protocol (PR) using @snazzah/davey.

  • State management
  • Encryption
  • Decryption
  • Store clients connected in a set for processProposals
  • Fix issue with session downgrades having some packets not play during playback
  • Handle decryption issues mid and after transition gracefully
  • Add some voice options and propagate some DAVE features

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)
  • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)

Copy link

vercel bot commented Jun 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
discord-js ⬜️ Ignored (Inspect) Visit Preview Jul 3, 2025 2:01am
discord-js-guide ⬜️ Ignored (Inspect) Visit Preview Jul 3, 2025 2:01am

Copy link

codecov bot commented Jun 4, 2025

Codecov Report

Attention: Patch coverage is 16.92650% with 373 lines in your changes missing coverage. Please review.

Project coverage is 41.70%. Comparing base (a5bd4cf) to head (50ad3cb).

Files with missing lines Patch % Lines
packages/voice/src/networking/DAVESession.ts 6.57% 199 Missing ⚠️
packages/voice/src/networking/Networking.ts 15.75% 123 Missing ⚠️
packages/voice/src/networking/VoiceWebSocket.ts 8.00% 23 Missing ⚠️
packages/voice/src/VoiceConnection.ts 42.42% 19 Missing ⚠️
packages/voice/src/receive/VoiceReceiver.ts 77.77% 6 Missing ⚠️
...ackages/voice/src/util/generateDependencyReport.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10921      +/-   ##
==========================================
- Coverage   42.50%   41.70%   -0.80%     
==========================================
  Files         263      264       +1     
  Lines       16070    16462     +392     
  Branches     1540     1541       +1     
==========================================
+ Hits         6830     6865      +35     
- Misses       9228     9585     +357     
  Partials       12       12              
Flag Coverage Δ
brokers 31.41% <ø> (ø)
builders 79.96% <ø> (ø)
collection 100.00% <ø> (ø)
core 0.89% <ø> (ø)
formatters 99.63% <ø> (ø)
proxy 65.88% <ø> (ø)
rest 87.67% <ø> (ø)
util 43.28% <ø> (ø)
utilities 100.00% <ø> (ø)
voice 60.25% <16.92%> (-10.20%) ⬇️
ws 36.03% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Snazzah Snazzah marked this pull request as ready for review June 8, 2025 21:01
@Snazzah Snazzah requested a review from a team as a code owner June 8, 2025 21:01
@Snazzah Snazzah requested a review from vladfrangu June 8, 2025 21:01
@Snazzah Snazzah requested review from iCrawl, kyranet and SpaceEEC June 8, 2025 21:01
@sdanialraza sdanialraza changed the title feat(voice): implement DAVE end-to-end encryption feat: implement DAVE end-to-end encryption Jun 8, 2025
@github-project-automation github-project-automation bot moved this from Todo to Review in Progress in discord.js Jun 9, 2025
@Jiralite Jiralite linked an issue Jun 9, 2025 that may be closed by this pull request
@Snazzah Snazzah requested a review from vladfrangu June 12, 2025 01:43
Copy link
Member

@vladfrangu vladfrangu left a comment

Choose a reason for hiding this comment

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

This needs a rebase

Copy link
Member

@Jiralite Jiralite left a comment

Choose a reason for hiding this comment

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

I see some "ID" usage – discord.js prefers "id" (#6036). Would you mind changing them please?

@Snazzah Snazzah requested a review from Jiralite July 3, 2025 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Review in Progress
Development

Successfully merging this pull request may close these issues.

support e2ee in voice
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy