- 🔄 利用 GitHub Actions 自动编译最新版 sing-box
- 🖥️ 定时更新 UI,支持 metacubexd 、zashboard 和 Yacd-meta
- 🌐 集成 OSPF 路由功能 (基于 bird2 实现)
- 🛡️ 定期修复容器中存在的严重漏洞
amd64 | x86 | armv6 | armv7 | arm64 | ppc64le | riscv64 | s390x |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
- GitHub Container Registry:
ghcr.io/dalamudx/sing-box-ospf
- DockerHub (自2025-05-13已弃用):
docker.io/dalamudx/sing-box-ospf
# 拉取最新版本
docker pull ghcr.io/dalamudx/sing-box-ospf:latest
# 拉取特定版本
docker pull ghcr.io/dalamudx/sing-box-ospf:v1.8.14
docker run -d \
--name sing-box \
--restart unless-stopped \
-v /path/to/app:/app \
-v /path/to/supervisor.d:/etc/supervisor.d \
-p 9090:9090 \
ghcr.io/dalamudx/sing-box-ospf:latest
.
├── app
│ ├── bird
│ │ ├── bird.conf # bird配置文件
│ │ ├── routes4.conf # ipv4路由
│ │ └── routes6.conf # ipv6路由
│ ├── cron # 定时任务
│ ├── sing-box
│ │ └── config.json # sing-box配置文件
│ ├── ui # UI更新脚本
│ └── update # 路由、GEO文件、UI更新
├── Dockerfile
├── entrypoint.sh
├── README.md
└── supervisor.d
└── service.ini # supervisor服务配置文件
-
Bird 配置:
- 修改
app/bird/bird.conf
第3行router id x.x.x.x;
中x.x.x.x
为实际IP地址 - 如有必要,请修改
interface
、authentication
和password
- 修改
-
Sing-Box 配置:
- 替换
app/sing-box/config.json
为你自己的配置文件 - 仓库中的配置仅供参考
- 替换
-
静态路由:
- 修改
app/update
脚本中第2、3行下载链接为你要部署的静态路由表链接
- 修改
-
部署方式:
- 将
app
目录挂载在容器的/app
路径 - 将
supervisor.d
目录挂载在容器的/etc/supervisor.d
路径
- 将
-
自定义配置保护:
- 本镜像不会自动更新
app
或supervisor.d
目录下文件 - 如需新功能,请手动更新相关文件以与仓库保持一致
- 更新时请自行
diff
文件内容,保持本地自定义设置
- 本镜像不会自动更新
-
旧版本升级:
- 如使用 2024-09-16 以前的版本,更新镜像后需更新以下文件:
app/cron
,app/update
,app/ui
,supervisor.d/service.ini
- 如使用 2024-09-16 以前的版本,更新镜像后需更新以下文件:
-
静态路由配置:
- 如需应用启动后立即广播路由,请提前准备
routes4.conf
和routes6.conf
放到app/bird
目录 - 或在容器启动后手动执行
sh /app/update
- 如需应用启动后立即广播路由,请提前准备
-
UI 更新机制:
- 更新 UI 功能通过删除本地目录并用
git
拉取最新版本实现 - 该目录在 sing-box 配置文件 config.json 中由
external_ui
定义 - 如未指定则不会对 UI 进行更新
- 更新 UI 功能通过删除本地目录并用
# 检查所有服务运行状态
supervisorctl status all
# 检查 bird 服务运行状态
supervisorctl status bird
# 重启所有服务
supervisorctl restart all
# 单独重启 sing-box 服务
supervisorctl restart sing-box
查看完整的更新日志了解详细的版本变更历史。