Files
rclone_gui/README.md
T
ci eb32fd5e22 init: 初始化 rclone-webgui 项目结构
外层仓库管理 webgui 源码、Docker 编排与项目文档;rclone 作为
git submodule 锁定在上游 master HEAD(59c86b01b),不携带任何
我们的改动。

- webgui/: webgui 源码(原本位于 rclone/cmd/webgui/)
  - web/: 原生 HTML/CSS/JS 静态前端(Anthropic 设计语言)
  - webgui.go: Go 子命令源码,仅当自行构建 rclone 二进制时需要
  - rclone-cmd-all-add-webgui-import.patch: 把 webgui 注册进
    rclone 的 cmd/all/all.go 的补丁,留作 fork 时使用
- rclone/: submodule → github.com/rclone/rclone,纯净不改动
- Dockerfile.webgui: 基于 nginx:1.27-alpine,从 ./webgui/web/
  COPY 静态资源
- docker/nginx.conf: SPA 静态托管 + 反向代理 RC API
  (/config/、/operations/、/sync/、/job/ 等) 与文件下载
  (/<remote>:<path>) 到 rclone rcd 容器,前端同源访问无 CORS
- docker-compose.yml: rclone (官方镜像 + rcd --rc-no-auth
  --rc-serve) + gui (nginx) 双服务编排,config 走 bind mount
  持久化
- DESIGN.md / CLAUDE.md / README.md: 文档
- .gitignore / .dockerignore: 排除 rclone.conf 等敏感文件,
  Docker 构建上下文只剩 webgui/web/ + nginx 配置(几十 KB)
2026-06-19 12:42:35 +08:00

3.1 KiB
Raw Blame History

rclone-webgui

浏览器端的 rclone 图形界面,使用 Anthropic / Claude 设计语言。

rclone/github.com/rclone/rclone 的 git submodule,锁定在上游某个 commit不携带我们的任何改动。 所有 webgui 源码、Docker 编排、文档都在本仓库。

项目结构

.
├── webgui/                  # webgui 源码(在父仓库,不在 rclone 子模块里)
│   ├── webgui.go           #   Go 子命令源码(仅当自行构建 rclone 时需要)
│   ├── rclone-cmd-all-add-webgui-import.patch  #   注解:把 webgui 注册进 rclone 的 cmd/all
│   └── web/                #   静态前端(nginx 服务的就是这一份)
│       ├── index.html
│       └── assets/
├── docker/                  # nginx 反向代理配置
├── config/rclone/          # rclone.conf 挂载点(bind mount,不提交)
├── Dockerfile.webgui       # 前端镜像构建(nginx + 静态资源)
├── docker-compose.yml      # rclone rcd + gui 双服务编排
├── DESIGN.md               # UI 设计系统规范
├── CLAUDE.md               # Claude Code 协作指引
└── rclone/                  # submodule → github.com/rclone/rclone,纯净不改动

功能

  • Remotes 管理 — 在浏览器里创建 / 编辑 / 删除 rclone remote,表单从 /config/providers 动态生成,覆盖全部 70+ 后端的全部选项。
  • 文件浏览 — 面包屑导航 + 文件表格,支持 mkdir / upload / delete / rename / download。
  • 同步任务 — copy / sync / move 异步任务,1.5 秒轮询进度(速度、 ETA、已传输 / 总量、错误计数),任务元信息(src→dst)持久化到 localStorage,刷新页面不丢。

OAuth 后端(drive、dropbox、onedrive 等)目前仅显示提示横幅, 引导用户在终端跑 rclone config 完成授权。

快速开始

# 1. 拉取子模块
git clone --recurse-submodules <your-fork-url>
# 或在已克隆的仓库里:
git submodule update --init

# 2. 启动堆栈
docker compose up -d --build

# 3. 打开 http://localhost:5580

端口

端口 服务 说明
5580 gui (nginx) 浏览器入口;同源反代 RC API
5572 rclone rcd 可直接 curl / rclone rc 访问

自行构建 rclone(可选)

Docker 编排默认使用官方 rclone/rclone:latest 镜像,配合 rcd 即可。 如果你想构建一个内置 webgui 命令的 rclone 二进制(rclone webgui 能像 rclone gui 那样独立运行),可以:

# 1. 把 webgui 源码软链或拷贝到 rclone 子模块的 cmd/ 下
ln -s ../../webgui rclone/cmd/webgui

# 2. 应用注册补丁
cd rclone && git apply ../webgui/rclone-cmd-all-add-webgui-import.patch

# 3. 构建
make

升级 rclone 子模块

cd rclone
git fetch origin
git checkout <new-tag-or-commit>
cd ..
git add rclone
git commit -m "chore: 升级 rclone 至 <new-tag>"

协议

  • 本外层仓库:MIT
  • rclone/ 子模块:遵循上游 rclone 的 MIT 协议