-
Notifications
You must be signed in to change notification settings - Fork 415
feat(voice): use voice gateway v8 and support new modes #1558
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
base: dev
Are you sure you want to change the base?
Conversation
resume still doesn't work properly, because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After testing for about half a day, resuming worked and no other issues were observed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Updates the voice connection implementation to use Voice Gateway v8 and adds support for new encryption modes (aead_aes256_gcm_rtpsize
and aead_xchacha20_poly1305_rtpsize
) while replacing tweetnacl with @stablelib/xchacha20poly1305.
- Replaces tweetnacl dependency with @stablelib/xchacha20poly1305 v1.0.1 for better encryption support
- Adds support for Voice Gateway v8 with improved resuming logic and session management
- Implements new AEAD encryption modes with preference-based selection
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
package.json | Replaces tweetnacl with @stablelib/xchacha20poly1305 and removes browser exclusion |
lib/voice/VoiceConnection.js | Major refactor implementing v8 gateway features, new encryption modes, and improved connection handling |
lib/Constants.js | Adds VOICE_VERSION constant set to 8 |
|
||
// RFC3550 5.1: Padding (may need testing) | ||
if (hasPadding) { | ||
const paddingAmount = data.subarray(0, data.length - 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect padding calculation. Should read the last byte of data to get padding amount: const paddingAmount = data[data.length - 1];
const paddingAmount = data.subarray(0, data.length - 1); | |
const paddingAmount = data[data.length - 1]; |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abalabahaha please confirm
Co-authored-by: Copilot <[email protected]>
This is a modified version of a combination of PRs on dysnomia: projectdysnomia/dysnomia#156, projectdysnomia/dysnomia#160, projectdysnomia/dysnomia#168
@stablelib/xchacha20poly1305
replaces tweetnacl, it uses v1 since v2 is in ESM.resuming
is set while connecting instead of before.