Rapptz / discord.py

An API wrapper for Discord written in Python.
http://discordpy.rtfd.org/en/latest
MIT License
14.9k stars 3.77k forks source link

Add support for DAVE (Discord Audio/Video end-to-end Encryption) protocol #9948

Open MisterSheeple opened 1 month ago

MisterSheeple commented 1 month ago

Summary

Today, Discord announced their E2EE protocol, DAVE. This issue is requesting the addition of DAVE support to discord.py.

What is the feature request for?

The core library

The Problem

The presence of a bot running discord.py in a call will cause the call to revert to not using E2EE, because discord.py does not currently support the DAVE protocol.

The Ideal Solution

If discord.py were to add support for the DAVE protocol, this can be fixed, allowing bots running discord.py to utilize E2EE in calls.

The whitepaper can be found here: https://github.com/discord/dave-protocol

There is also a library (libdave) written in C++ that can be found here: https://github.com/discord/libdave

The Current Solution

No response

Additional Context

No response

imayhaveborkedit commented 1 month ago

The addition E2EE adds no new functionality for bots. What's your use case for this?

MCausc78 commented 1 month ago

The addition E2EE adds no new functionality for bots. What's your use case for this?

It adds nothing for bots, but non-e2ee connections are going to be discontinued after 6 months (see changelog entry). The only benefit I see for users of bot is faster connecting speed (without Discord having to downgrade connection to non-e2ee)

mikeshardmind commented 1 month ago

For anyone who hasnt read it, the protocol is intended to change soon. The whitepaper currently says:

We are actively working on removing the synthesization of silence packets from the SFU, and will update the protocol to remove the silence packet passthrough exception once this is completed.

No767 commented 1 month ago

You are not immediately required to support the E2EE protocol, as calls will automatically upgrade/downgrade to/from E2EE depending on the support of clients in the call.

From what I read in the changelogs, it's implying that DAVE will be the new standard protocol at some point in the near future. We can probably wait until the deprecation timeline is announced and then work on migration the voice connections to E2EE.

MisterSheeple commented 1 month ago

We can probably wait until the deprecation timeline is announced and then work on migration the voice connections to E2EE.

In any case, it'd probably be better to get a head start, if possible.

No767 commented 1 month ago

For now I'd propose that we wait. If you want to make the change, feel free to make a PR