matrix-construct/tuwunel

GitHub: matrix-construct/tuwunel

Rust 编写的高性能 Matrix 家服务器,作为 conduwuit 的官方继任者,提供轻量、企业级的自托管即时通讯解决方案。

Stars: 1572 | Forks: 103

# Tuwunel💕 ![GitHub License](https://img.shields.io/github/license/matrix-construct/tuwunel?style=flat%2Dsquare&color=%238A2BE2) ![GitHub Created At](https://img.shields.io/github/created-at/matrix-construct/tuwunel?style=flat%2Dsquare&color=%238A2BE2) ![GitHub Commit Activity](https://img.shields.io/github/commit-activity/m/matrix-construct/tuwunel?style=flat%2Dsquare&link=https%3A%2F%2Fgithub.com%2Fmatrix-construct%2Ftuwunel%2Fpulse%2Fmonthly&color=%238A2BE2) ![Docker Pulls](https://img.shields.io/docker/pulls/jevolk/tuwunel?style=flat%2Dsquare&color=8A2BE2) ![GitHub Repo Stars](https://img.shields.io/github/stars/matrix-construct/tuwunel?style=flat%2Dsquare&link=https%3A%2F%2Fgithub.com%2Fmatrix-construct%2Ftuwunel&color=%238A2BE2) [![CI/CD](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/6a2ed149be173720.svg)](https://github.com/matrix-construct/tuwunel/actions/workflows/main.yml) ## 高性能 Rust Matrix 家服务器! [![文档](https://img.shields.io/badge/documentation%2D_?color=%238A2BE2&style=for-the-badge&logo=mdBook&logoColor=FFFFFF)](https://matrix-construct.github.io/tuwunel/) [![演示服务器](https://img.shields.io/badge/demo%20server%2D_?color=%238A2BE2&style=for-the-badge&logo=Element&logoColor=FFFFFF)](https://try.tuwunel.chat) [![支持聊天室](https://img.shields.io/matrix/tuwunel%3Amatrix.org.svg?color=098A09&style=for-the-badge&label=Support%20Chat&labelColor=8A2BE2&logo=Matrix)](https://matrix.to/#/#tuwunel:grin.hu) Tuwunel 是一个功能丰富的 [Matrix](https://matrix.org/) 家服务器,你可以用它来替代 Synapse, 配合你喜欢的 [客户端](https://matrix.org/ecosystem/clients/)、 [网桥](https://matrix.org/ecosystem/bridges/) 或 [机器人](https://matrix.org/ecosystem/integrations/)。它完全使用 Rust 编写,旨在成为一个可扩展、 低成本、企业级、社区驱动的替代方案,几乎完全实现了除最利基用途外的所有 [Matrix 规范](https://spec.matrix.org/latest/)。 本项目是 [conduwuit](https://github.com/x86pup/conduwuit) 达到稳定状态后的官方继任者。Tuwunel 现已被许多公司使用,这些公司对其全职员工进行的持续开发投入了大量资金。它主要由 瑞士政府 🇨🇭 资助,目前正部署供其公民使用。 ### 快速入门 - [GitHub Releases](https://github.com/matrix-construct/tuwunel/releases) - [源代码](https://github.com/matrix-construct/tuwunel/) `git clone https://github.com/matrix-construct/tuwunel.git` - [DockerHub](https://hub.docker.com/r/jevolk/tuwunel) 或 `docker pull jevolk/tuwunel:latest` - [GHCR](https://github.com/matrix-construct/tuwunel/pkgs/container/tuwunel) 或 `docker pull ghcr.io/matrix-construct/tuwunel:latest` - 静态二进制文件可通过 [releases](https://github.com/matrix-construct/tuwunel/releases) 或 [build artifacts](https://github.com/matrix-construct/tuwunel/actions?query=branch%3Amain) 获取。 - Deb 和 RPM 包可通过 [releases](https://github.com/matrix-construct/tuwunel/releases) 或 [build artifacts](https://github.com/matrix-construct/tuwunel/actions?query=branch%3Amain) 获取。 - Arch 包可通过 [tuwunel](https://aur.archlinux.org/packages/tuwunel) 或 [tuwunel-git](https://aur.archlinux.org/packages/tuwunel-git) 获取。 - Nix 包可通过 [`matrix-tuwunel`](https://search.nixos.org/packages?query=matrix-tuwunel) 获取,NixOS 模块可通过 [`services.matrix-tuwunel`](https://search.nixos.org/options?query=services.matrix-tuwunel) 获取。 - Alpine 包可通过 [tuwunel](https://pkgs.alpinelinux.org/package/edge/testing/x86_64/tuwunel) 获取。 **1.** [配置](https://matrix-construct.github.io/tuwunel/configuration.html): 复制并编辑 `tuwunel-example.toml`。必须配置 `server_name` 和 `database_path`。 **大多数用户通过 docker 或发行版包部署,应遵循[相应的指南](https://matrix-construct.github.io/tuwunel/deploying.html)。** 这仅为 impatient 用户提供的摘要。请参阅完整 [文档](https://matrix-construct.github.io/tuwunel/)。 **2.** 设置 TLS 证书。大多数用户喜欢使用 [Caddy](https://caddyserver.com/) 反向代理, 它可以自动续期证书。高级用户可以使用配置加载自己的 TLS 证书, Tuwunel 也可以在没有反向代理的情况下部署。示例 `/etc/caddy/Caddyfile` 配置,假设 [Element](https://github.com/element-hq/element-web/releases) 解压到 `/var/www/element`: ``` tuwunel.me, tuwunel.me:8448 { reverse_proxy localhost:8008 } web.tuwunel.me { root * /var/www/element/ file_server } ``` `caddy reload --config /etc/caddy/Caddyfile` **3.** 启动服务器,连接你的客户端并注册你的用户名。第一个注册的账户将被授予服务器管理员权限。 🤗 你觉得这篇文档和其他文档有帮助吗?我们很乐意听取关于搭建 Tuwunel 的反馈。 ### 迁移到 Tuwunel | 我可以从 | 迁移吗 | | |-----------------|-----------| | conduwuit? | ✅ 可以。这至少会在一年内受到支持,但很可能会无限期支持。 | | Synapse? | ❌ 暂不支持,但这已在计划中且是一个重要问题。请订阅 [#2](https://github.com/matrix-construct/tuwunel/issues/2)。 | | Conduit? | ❌ 暂不支持,但这计划在不久的将来实现。请订阅 [#41](https://github.com/matrix-construct/tuwunel/issues/41)。 | | 任何其他 Conduit 分支? | ❌ 不行。迁移必须在此表中明确列出。 | #### 从 conduwuit 迁移 从 conduwuit 迁移到 Tuwunel _非常顺畅_。用技术术语来说,这是一个“二进制替换”。 你所要做的就是更新到最新的 Tuwunel,并将可执行文件路径从 `conduwuit` 改为 `tuwunel`。 任何其他名为“conduwuit”的东西仍然会被识别,这包括带有前缀 如 `CONDUWUIT_` 的环境变量。事实上,为了我们的老用户,`CONDUIT_` 仍然被识别。你可能已经注意到各种配置、yaml、服务、用户和其他项目被重命名了,但如果你是 conduwuit 用户,我们建议根本不要更改任何东西。这会让事情保持简单。 如果你不确定,请提问。如果你发现确实需要更改某些内容, 请立即提出 issue。 ### 升级和降级 Tuwunel 我们努力使 Tuwunel 版本之间的迁移安全且简单。降级 Tuwunel 总是 安全的,但通常会被防护机制阻止。错误将指示降级不可能,必须 寻找不会出错的新版本。 #### 分支 主分支总是 _相当安全_ 的。我们理解用户倾向于直接克隆 主分支来启动和运行,我们有义务确保它始终可行。尽管如此,只有 标记的发布才是真正的发布。 #### 容器跟踪 跟踪 `:latest` 让我们有必要酌情将你保持在适当的稳定版本上。 我们不鼓励跟踪主分支,除非频繁重启是可以接受的。或者, 跟踪 `:preview` 标签提供最新的候选发布版本,在发布后 等同于 `:latest`。跟踪 `:preview` 标签是主分支的一个值得替代方案,其 波动性仅限于发布时。 ### 获取帮助和支持 如果你反对使用 github,或者需要私下讨论(例如安全 披露),或出于任何其他原因,我很乐意在 [@jason:tuwunel.me](https://matrix.to/#/@jason:tuwunel.me) 接收你的私信。这不会打扰我,因为 在可能的情况下帮助你将是我的荣幸。作为紧急联系方式,你可以发送电子邮件至 jasonzemos@gmail.com。 ##### Tuwunel 粉丝俱乐部 我们有一个非官方的社区聊天室,公开访问地址为 [#tuwunel:matrix.org](https://matrix.to/#/#tuwunel:matrix.org)。该聊天室的成员、内容或管理 决策与本项目或其赞助商没有任何关系或认可, 并非所有项目工作人员都会在那里。只要聊天室保持最低限度的良好状态, 工作人员至少会在那里提供帮助。 ## Tuwunel💕 Tuwunel 的主题是沟通中的 **共情**,定义于 [Edith Stein]() 的著作。共情是我们对待 每条消息的方式以及我们在每次对话中对他人责任的基础。
标签:Conduwuit, Docker, IM, Matrix, Python安全, Rust, Synapse替代, Tuwunel, 云安全, 企业级, 即时通讯, 去中心化, 可视化界面, 后端开发, 安全防御评估, 家庭服务器, 开源, 服务端软件, 网络流量审计, 聊天服务器, 联邦协议, 请求拦截, 通信协议, 通知系统