🌩支持多家云存储的云盘系统 (Self-hosted file management and sharing system, supports multiple storage providers)
Find a file
AaronLiu 056de22edb
Feat: aria2 download and transfer in slave node (#1040)
* Feat: retrieve nodes from data table

* Feat: master node ping slave node in REST API

* Feat: master send scheduled ping request

* Feat: inactive nodes recover loop

* Modify: remove database operations from aria2 RPC caller implementation

* Feat: init aria2 client in master node

* Feat: Round Robin load balancer

* Feat: create and monitor aria2 task in master node

* Feat: salve receive and handle heartbeat

* Fix: Node ID will be 0 in download record generated in older version

* Feat: sign request headers with all `X-` prefix

* Feat: API call to slave node will carry meta data in headers

* Feat: call slave aria2 rpc method from master

* Feat: get slave aria2 task status
Feat: encode slave response data using gob

* Feat: aria2 callback to master node / cancel or select task to slave node

* Fix: use dummy aria2 client when caller initialize failed in master node

* Feat: slave aria2 status event callback / salve RPC auth

* Feat: prototype for slave driven filesystem

* Feat: retry for init aria2 client in master node

* Feat: init request client with global options

* Feat: slave receive async task from master

* Fix: competition write in request header

* Refactor: dependency initialize order

* Feat: generic message queue implementation

* Feat: message queue implementation

* Feat: master waiting slave transfer result

* Feat: slave transfer file in stateless policy

* Feat: slave transfer file in slave policy

* Feat: slave transfer file in local policy

* Feat: slave transfer file in OneDrive policy

* Fix: failed to initialize update checker http client

* Feat: list slave nodes for dashboard

* Feat: test aria2 rpc connection in slave

* Feat: add and save node

* Feat: add and delete node in node pool

* Fix: temp file cannot be removed when aria2 task fails

* Fix: delete node in admin panel

* Feat: edit node and get node info

* Modify: delete unused settings
2021-10-31 09:41:56 +08:00
.github Update build.yml 2021-03-20 22:46:01 -08:00
assets@8a61a8e4c2 Feat: aria2 download and transfer in slave node (#1040) 2021-10-31 09:41:56 +08:00
bootstrap Feat: aria2 download and transfer in slave node (#1040) 2021-10-31 09:41:56 +08:00
middleware Feat: aria2 download and transfer in slave node (#1040) 2021-10-31 09:41:56 +08:00
models Feat: aria2 download and transfer in slave node (#1040) 2021-10-31 09:41:56 +08:00
pkg Feat: aria2 download and transfer in slave node (#1040) 2021-10-31 09:41:56 +08:00
routers Feat: aria2 download and transfer in slave node (#1040) 2021-10-31 09:41:56 +08:00
service Feat: aria2 download and transfer in slave node (#1040) 2021-10-31 09:41:56 +08:00
.gitignore bug fix: can't connect to postgres database (#992) 2021-10-29 20:30:26 +08:00
.gitmodules Modify: use public URL for asserts module 2020-03-12 12:07:07 +08:00
.travis.yml Fix: node js version 2020-06-01 20:27:06 +08:00
build.sh Comply with Golang semantic import versioning (#630) 2020-11-21 17:34:55 +08:00
Dockerfile Comply with Golang semantic import versioning (#630) 2020-11-21 17:34:55 +08:00
go.mod Feat: aria2 download and transfer in slave node (#1040) 2021-10-31 09:41:56 +08:00
go.sum Feat: aria2 download and transfer in slave node (#1040) 2021-10-31 09:41:56 +08:00
LICENSE Add: README & License 2020-03-12 19:20:40 +08:00
main.go Fix: stop listening HTTP port if unix socket is enabled (#729) 2021-03-17 14:19:05 +08:00
README.md Comply with Golang semantic import versioning (#630) 2020-11-21 17:34:55 +08:00



Cloudreve

支持多家云存储驱动的公有云文件系统.

travis

演示站讨论社区文档下载Telegram 群组许可证

Screenshot

特性

  • ☁️ 支持本机、从机、七牛、阿里云 OSS、腾讯云 COS、又拍云、OneDrive (包括世纪互联版) 作为存储端
  • 📤 上传/下载 支持客户端直传,支持下载限速
  • 💾 可对接 Aria2 离线下载
  • 📚 在线 压缩/解压缩、多文件打包下载
  • 💻 覆盖全部存储策略的 WebDAV 协议支持
  • 拖拽上传、目录上传、流式上传处理
  • 🗃️ 文件拖拽管理
  • 👩‍👧‍👦 多用户、用户组
  • 🔗 创建文件、目录的分享链接,可设定自动过期
  • 👁️‍🗨️ 视频、图像、音频、文本、Office 文档在线预览
  • 🎨 自定义配色、黑暗模式、PWA 应用、全站单页应用
  • 🚀 All-In-One 打包,开箱即用
  • 🌈 ... ...

🛠️ 部署

下载适用于您目标机器操作系统、CPU架构的主程序直接运行即可。

# 解压程序包
tar -zxvf cloudreve_VERSION_OS_ARCH.tar.gz

# 赋予执行权限
chmod +x ./cloudreve

# 启动 Cloudreve
./cloudreve

以上为最简单的部署示例,您可以参考 文档 - 起步 进行更为完善的部署。

⚙️ 构建

自行构建前需要拥有 Go >= 1.13yarn等必要依赖。

克隆代码

git clone --recurse-submodules https://github.com/cloudreve/Cloudreve.git

构建静态资源

# 进入前端子模块
cd assets
# 安装依赖
yarn install
# 开始构建
yarn run build

嵌入静态资源

# 回到项目主目录
cd ../

# 安装 statik, 用于嵌入静态资源
go get github.com/rakyll/statik

# 开始嵌入
statik -src=assets/build/  -include=*.html,*.js,*.json,*.css,*.png,*.svg,*.ico -f

编译项目

# 获得当前版本号、Commit
export COMMIT_SHA=$(git rev-parse --short HEAD)
export VERSION=$(git describe --tags)

# 开始编译
go build -a -o cloudreve -ldflags " -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.BackendVersion=$VERSION' -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.LastCommit=$COMMIT_SHA'"

你也可以使用项目根目录下的build.sh快速开始构建:

./build.sh  [-a] [-c] [-b] [-r]
	a - 构建静态资源
	c - 编译二进制文件
	b - 构建前端 + 编译二进制文件
	r - 交叉编译构建用于release的版本

⚗️ 技术栈

📜 许可证

GPL V3


GitHub @HFO4  ·  Twitter @abslant00