# TeddyCloud：可自托管的 Toniebox 云端替代服务器

> 以可自托管的 C 服务器重新实现 Toniebox 所连接的 Boxine 云服务，使盒子能在本地获取音频、设置和无线下发内容，同时由用户控制哪些数据发往厂商。它可提供并缓存 tonie 音频，把其他音频转换为盒子使用的 TAF 格式，可将请求透传到原云端，并提供网页界面、MQTT 及 Home Assistant 集成。仓库中的 protobuf 定义描述了盒子的 freshness-check、RTNL 日志和 TAF 头部报文。

- 类型：案例
- 目标：固件 · 协议
- 类别：独立重建案例
- 关联：独立重建项目
- 来源复核于：2026-10-19
- 收录于：2026-10-27
- 原始资源：<https://github.com/toniebox-reverse-engineering/teddycloud>
- 一手来源：<https://github.com/toniebox-reverse-engineering/teddycloud/blob/78c3b38e36f665d3a5fffe907f73a02725176377/README.md>
- 目录页面：<https://awesomerea.org/zh/resources/teddycloud-toniebox-server-case/>
- 记录 JSON：<https://awesomerea.org/resources/teddycloud-toniebox-server-case/record.json>
- 英文版：[English](https://awesomerea.org/resources/teddycloud-toniebox-server-case/index.md)

## 使用条件与局限

- 审阅对象为 2026-08-25 的稳定版 master 最新提交，即 v0.7.0 合并提交；tc_v0.7.0 发布于同日打标签，日常开发在 develop 分支进行。项目的安装指南覆盖使用 CC3200、CC3235 或 ESP32 芯片的 Toniebox 1，README 将 Toniebox 2 支持列为计划中。
- 安装过程具有侵入性，且每台盒子各不相同：项目指南要求用户导出自己盒子的客户端证书、向盒子刷入替代 CA 并重定向其 DNS；服务器还可以在 ESP32 固件转储中提取或注入证书。仓库不提供任何盒子证书、固件或 tonie 音频（相应目录只是空占位）。dev-sandbox 中预先生成的证书为自签名证书，仅用于本地测试。
- 构建使用手写的 Makefile、protoc-c 和 C 工具链，并需要 CycloneTCP/SSL/Crypto、cJSON、Opus、Ogg、teddycloud_web 前端及 emsdk 等子模块；Linux 调试构建默认启用 AddressSanitizer 和 UBSan，在 macOS 上推荐使用 Docker 构建。tc_v0.7.0 版附带由 Windows/Linux 发布工作流生成的 amd64 压缩包，并为多个平台发布 Debian、Ubuntu 和 Alpine Docker 镜像。音频流转换使用 ffmpeg。
- 自定义 tonie JSON 接口的 Python API 测试和 WASM TAF 编码器测试通过 Makefile 目标运行；所审阅的工作流只构建并发布，不运行这些测试。dev-sandbox 提供模拟的 tonie、盒子和 TAF 数据。与真实盒子及 Boxine 云端配合的表现仍属项目报告。
- 采用 GPL-2.0（LICENSE）；内置的 Cyclone 协议栈、Opus、Ogg、cJSON 和 FatFs 保留各自条款。tonie 音频、盒子固件和 Boxine 的服务保留各自权利。

## 一手来源

1. <https://github.com/toniebox-reverse-engineering/teddycloud/blob/78c3b38e36f665d3a5fffe907f73a02725176377/README.md>
2. <https://github.com/toniebox-reverse-engineering/teddycloud/blob/78c3b38e36f665d3a5fffe907f73a02725176377/CONTRIBUTING.md>
3. <https://github.com/toniebox-reverse-engineering/teddycloud/blob/78c3b38e36f665d3a5fffe907f73a02725176377/.gitmodules>
4. <https://github.com/toniebox-reverse-engineering/teddycloud/blob/78c3b38e36f665d3a5fffe907f73a02725176377/Makefile>
5. <https://github.com/toniebox-reverse-engineering/teddycloud/tree/78c3b38e36f665d3a5fffe907f73a02725176377/proto>
6. <https://github.com/toniebox-reverse-engineering/teddycloud/tree/78c3b38e36f665d3a5fffe907f73a02725176377/contrib/certs>
7. <https://github.com/toniebox-reverse-engineering/teddycloud/blob/78c3b38e36f665d3a5fffe907f73a02725176377/dev-sandbox/README.md>
8. <https://github.com/toniebox-reverse-engineering/teddycloud/blob/78c3b38e36f665d3a5fffe907f73a02725176377/tests/test_tonies_custom_json_api.py>
9. <https://github.com/toniebox-reverse-engineering/teddycloud/blob/78c3b38e36f665d3a5fffe907f73a02725176377/.github/workflows/build_release.yml>
10. <https://github.com/toniebox-reverse-engineering/teddycloud/blob/78c3b38e36f665d3a5fffe907f73a02725176377/.github/workflows/publish_docker_matrix_base.yml>
11. <https://github.com/toniebox-reverse-engineering/teddycloud/blob/78c3b38e36f665d3a5fffe907f73a02725176377/LICENSE>
12. <https://github.com/toniebox-reverse-engineering/teddycloud/releases/tag/tc_v0.7.0>
13. <https://tonies-wiki.revvox.de/docs/tools/teddycloud/setup/>

## 同分区更多条目：固件与硬件

- [Valetudo：扫地机器人厂商云的本地替代](https://awesomerea.org/zh/resources/valetudo-robot-cloud-replacement-case/index.md) · 案例
- [EchoMuse：把第二代 Echo Dot 变成 Home Assistant 语音终端的替换软件](https://awesomerea.org/zh/resources/echomuse-echo-dot-voice-satellite-case/index.md) · 案例
- [OSIRIS：基于 MCU 协议研究替换 Onkyo 功放固件](https://awesomerea.org/zh/resources/osiris-onkyo-receiver-case/index.md) · 案例
- [Virtual MPC Sample：在 QEMU 中运行 Akai MPC Sample 固件](https://awesomerea.org/zh/resources/virtual-mpc-sample-case/index.md) · 案例
- [OpenJooki：替换 Jooki 2 软件与恢复流程](https://awesomerea.org/zh/resources/openjooki-jooki2-case/index.md) · 案例
- [Stickwalker：将 Pokéwalker 固件移植到 Stick S3](https://awesomerea.org/zh/resources/stickwalker-case/index.md) · 案例

## 关于此条目

说明已依据一手来源复核。
原创说明采用 MIT 许可；外部项目、论文与素材保留各自的权利和许可。
