2024-11-18のVCの古いtransport encryptionの廃止について
必要な対応
@discordjs/voiceを0.18以後のバージョンに更新する必要がある。
tweetnaclを使用している場合は削除してもよい。
影響
2024/11/18から、古いtransport encryption(xsalsa20poly1305の系統と、aead_aes256gcm)を使用してボイスチャンネルへの接続を試みるクライアントはdiscordによって拒否される。
@discordjs/voiceの0.18より前のバージョンはxsalsa20poly1305の系統のみしかサポートしていないため、上記の変更によって拒否される。
@discordjs/voiceの暗号化関連の依存関係が変更になった。
AES256GCMがサポートされている場合は暗号関連の追加のライブラリは不要になった。
require('node:crypto').getCiphers().includes('aes-256-gcm')を実行することで確認できる。
code:diff
sodium-native: ^3.3.0
sodium: ^3.0.2
- tweetnacl: ^1.0.3
+ @stablelib/xchacha20poly1305: ^2.0.0
+ @noble/ciphers: ^1.0.0
libsodium-wrappers: ^0.7.9
refs
change log
https://discord.com/developers/docs/change-log#voice-encryption-modes
PR
https://github.com/discordjs/discord.js/pull/10451
https://github.com/discordjs/discord.js/pull/10602