thomas-vilte/dave-go

GitHub: thomas-vilte/dave-go

一个用纯 Go 语言实现的 Discord DAVE 端到端加密库,解决语音通信的安全隐私问题。

Stars: 6 | Forks: 1

# dave-go [![版本发布](https://img.shields.io/github/v/release/thomas-vilte/dave-go?sort=semver)](https://github.com/thomas-vilte/dave-go/releases) [![许可证](https://img.shields.io/github/license/thomas-vilte/dave-go)](https://github.com/thomas-vilte/dave-go/blob/master/LICENSE) [![Go 参考文档](https://pkg.go.dev/badge/github.com/thomas-vilte/dave-go.svg)](https://pkg.go.dev/github.com/thomas-vilte/dave-go) [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/6aa683c026075234.svg)](https://github.com/thomas-vilte/dave-go/actions/workflows/go.yml) `dave-go` 是一个纯 Go 的 DAVE 实现,旨在实现 `github.com/disgoorg/godave.Session` 接口。 最初,我是在尝试让 DAVE 所需的 MLS 部分在纯 Go 中运行时开始这个项目的,结果它逐渐发展成一个独立的实现。它构建于 [`github.com/thomas-vilte/mls-go`](https://github.com/thomas-vilte/mls-go) 之上。 ## 状态 它已经可以工作并可使用,但我仍认为它处于早期阶段,并且有一些粗糙之处需要我随着时间的推移来完善。 ## 安装 ``` go get github.com/thomas-vilte/dave-go ``` 对于带标签的版本: ``` go get github.com/thomas-vilte/dave-go@v0.1.0 ``` ## 使用方法 在任何需要 `godave.SessionCreateFunc` 的地方使用会话实现: ``` import ( "github.com/disgoorg/disgo/voice" "github.com/thomas-vilte/dave-go/session" ) voice.WithDaveSessionCreateFunc(session.New) ``` [`examples/voice`](https://github.com/thomas-vilte/dave-go/tree/master/examples/voice) 中还有一个小型的 `disgo` 语音示例。 ## 包 - [`session`](https://pkg.go.dev/github.com/thomas-vilte/dave-go/session): `godave.Session` 实现 - [`mediakeys`](https://pkg.go.dev/github.com/thomas-vilte/dave-go/mediakeys): 发送者密钥派生与棘轮机制 - [`frame`](https://pkg.go.dev/github.com/thomas-vilte/dave-go/frame): DAVE 帧加密/解密逻辑 - `codecs`: 会话层使用的编解码器感知帧转换 ## 参考资料 - [`godave`](https://github.com/disgoorg/godave) - [`mls-go`](https://github.com/thomas-vilte/mls-go) - [Go 包文档](https://pkg.go.dev/github.com/thomas-vilte/dave-go) - [`session` 包文档](https://pkg.go.dev/github.com/thomas-vilte/dave-go/session) - [RFC 9420](https://www.rfc-editor.org/rfc/rfc9420.html) ## 注意事项 - 示例从本地的 `.dca` 文件流式传输 Opus 帧 - 一些内部注释可能仍会随时间推移而整理
标签:DAVE 协议, Discord, EVTX分析, Go 库, Go 语言, MLS 协议, 会话管理, 加密, 即时通讯, 安全协议, 安全通信, 实时通信, 密钥派生, 帧加密, 日志审计, 漏洞扫描器, 端到端加密, 纯 Go 实现, 编解码器, 语音安全, 通信安全, 音频加密