foxly-it/rootguard
GitHub: foxly-it/rootguard
RootGuard 将 AdGuard Home 的 DNS 过滤与 Unbound 的递归解析及 DNSSEC 验证封装为统一的自托管 Docker 技术栈,通过 Web 界面实现网络级广告拦截的集中部署与管理。
Stars: 0 | Forks: 0
# RootGuard

**RootGuard 在您的网络中集中保护所有设备免受广告和**
已知追踪器的侵扰。** 为此,一个直观的 Web 界面将
[AdGuard Home](https://github.com/AdguardTeam/AdGuardHome) 与专用的
递归 [Unbound](https://github.com/NLnetLabs/unbound) 解析器结合在一起 —— 作为
一个完整的、自托管的 Docker Stack。
[](https://github.com/foxly-it/rootguard/releases)
[](https://github.com/foxly-it/rootguard/actions/workflows/ci.yml)
[](LICENSE)
[](https://rootguard.foxly.de/)
[网站](https://rootguard.foxly.de/) ·
[手册](https://rootguard.foxly.de/docs.html) ·
[Wiki](https://rootguard.foxly.de/wiki.html) ·
[路线图](https://rootguard.foxly.de/roadmap.html) ·
[版本发布](https://github.com/foxly-it/rootguard/releases)
## 为什么选择 RootGuard?
DNS 过滤器可以为电视、智能手机、
游戏主机和计算机拦截广告和追踪器,而无需在每个设备上安装扩展。
RootGuard 在此过滤基础上增加了自己的解析器
和统一的操作界面。
- **网络级过滤:** AdGuard Home 可拦截不需要的 DNS 请求。
- **专属 DNS 解析:** Unbound 递归查询 DNS 层级结构并
验证 DNSSEC。
- **集中管理:** 设置、配置、更新和回滚均
通过 RootGuard Web 界面进行。
- **自托管且开源:** 数据和控制权保留在您自己的
Docker 主机上;源代码在 AGPL-3.0-or-later 许可下提供。
```
Geräte im Netzwerk → AdGuard Home → Unbound → DNS-Hierarchie
Filter DNSSEC
```
## 快速开始
前提是拥有一台安装了 Docker Compose v2 的计算机。公开的 Alpha
版本使用适用于 `amd64` 和 `arm64` 的预构建镜像;无需
本地构建。
```
mkdir rootguard-alpha && cd rootguard-alpha
curl -LO https://raw.githubusercontent.com/foxly-it/rootguard/v0.1.0-alpha.2/compose.alpha.yaml
curl -Lo .env https://raw.githubusercontent.com/foxly-it/rootguard/v0.1.0-alpha.2/.env.alpha.example
```
生成两个相互独立的安全密钥:
```
openssl rand -hex 32
openssl rand -hex 32
```
在 `.env` 中输入您自己的高强度 `ROOTGUARD_ADMIN_PASSWORD`,并分别将这两个
值填入 `ROOTGUARD_API_TOKEN` 和 `ROOTGUARD_RECOVERY_TOKEN`。
然后启动 Stack:
```
docker compose -f compose.alpha.yaml up -d
```
打开 `http://:8080/login` 并按照引导进行设置。
完整的前提条件、路由器设置和故障排除请参阅
[手册](https://rootguard.foxly.de/docs.html#quickstart)。
## 包含哪些内容?
| 组件 | 任务 |
| --- | --- |
| **RootGuard WebApp** | 登录、仪表盘和引导式操作 |
| **RootGuard Core** | 编排和经过验证的配置更改 |
| **RootGuard Updater** | 统一的 Core/WebApp 更新及回滚 |
| **AdGuard Home** | 网络级 DNS 过滤 |
| **Unbound** | 递归 DNS 解析和 DNSSEC 验证 |
[产品实时预览](https://rootguard.foxly.de/) 展示了当前的
界面。架构、信任边界和更新流程特意
从本入门指南中剥离出去:
- [安装与运行](https://rootguard.foxly.de/docs.html)
- [架构](docs/architecture.md)
- [当前项目状态](docs/project-state.md)
- [1.0 版本路线图](ROADMAP.md)
- [Release Notes v0.1.0-alpha.2](RELEASE_NOTES_0.1.0-alpha.2.md)
## 开发
要对整个项目进行更改,请克隆包含其
组件 Submodule 的仓库:
```
git clone --recurse-submodules https://github.com/foxly-it/rootguard.git
cd rootguard
cp .env.example .env
docker compose up --build -d
```
这些组件仍然是独立的仓库:
| 仓库 | 职责 |
| --- | --- |
| [`rootguard-core`](https://github.com/foxly-it/rootguard-core) | 控制平面和 DNS 编排 |
| [`rootguard-webapp`](https://github.com/foxly-it/rootguard-webapp) | Web 界面和会话管理 |
| [`rootguard-updater`](https://github.com/foxly-it/rootguard-updater) | 受控的控制平面更新 |
| [`rootguard-unbound`](https://github.com/foxly-it/rootguard-unbound) | 加固的 Unbound 镜像 |
## 贡献
欢迎贡献代码、测试和编写清晰的文档。
[贡献指南](CONTRIBUTING.md) 说明了开发设置、职责分工、
测试和 Pull Requests。
带有
[`good first issue`](https://github.com/foxly-it/rootguard/labels/good%20first%20issue)
或 [`help wanted`](https://github.com/foxly-it/rootguard/labels/help%20wanted) 标签的 Issue 是很好的切入点。
请不要公开报告安全问题,而是按照
[SECURITY.md](SECURITY.md) 中的说明进行操作。
## 许可证与商标
RootGuard 是基于
[GNU AGPL-3.0-or-later](LICENSE) 许可证的自由软件。有关使用 RootGuard 和 Foxly IT 名称及徽标的说明,请参阅 [TRADEMARKS.md](TRADEMARKS.md)。
标签:AdGuard Home, DNS, Docker, Docker 部署, Unbound, 后端开发, 安全防御评估, 广告拦截, 版权保护, 网络运维, 自托管, 请求拦截