Skip to content

Commit 39bfc24

Browse files
committed
docs: update the docs for v1.6
1 parent 6c99da5 commit 39bfc24

24 files changed

+498
-432
lines changed

docs/README.md

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,51 @@
1-
### Welcome
2-
!> The project has just started, and the documentation is not complete, please help with PR
1+
### 欢迎
2+
!> 项目刚开始,文档尚不完善,欢迎帮忙PR
33

4-
### Introduction
5-
ZPan is committed to creating an unlimited speed network disk system, so we use the client to connect directly to cloud storage for design.
4+
### 介绍
5+
ZPan致力于打造一款不限速的网盘系统,因此我们采用客户端直连云存储的方式进行设计。
66

7-
Currently ZPan supports all cloud storage platforms compatible with the S3 protocol. You can choose a platform you are familiar with to drive ZPan.
7+
目前ZPan支持所有兼容S3协议的云存储平台,您可以选用您熟悉的平台来驱动ZPan。
88

9-
[Online Live](http://zpan.saltbo.cn)(username:demo,password:demo)
9+
[在线体验](http://zpan.saltbo.cn)(体验账号:demo,密码:demo)
1010

11-
### How It Works
11+
### 他是如何工作的?
1212

13-
ZPan is essentially a URL signature server + a visual file browser.
13+
ZPan本质上是一个URL签名服务器+可视化的文件浏览器。
1414

15-
Because we use a direct-link method for uploading and downloading, in order to ensure the security of uploading and downloading, all URLs used by the client to upload and download must be signed by the server.
15+
因为我们采用直链的方式进行上传下载,所以为了保证上传下载的安全性,客户端用来上传下载的URL均需要服务端进行签名。
1616

17-
Then, in order to conveniently manage the files uploaded by users, we need to develop a visual pseudo file system for file management.
17+
然后为了能给方便的管理用户上传的文件,我们就需要开发一个可视化的伪文件系统来进行文件管理。
1818

1919
- [saltbo/zpan](https://github.com/saltbo/zpan)
2020
- [saltbo/zpan-front](https://github.com/saltbo/zpan-front)
2121

22-
### Features
23-
- Not limited by server bandwidth
24-
- Support all cloud storage compatible with S3 protocol
25-
- Support file and folder management
26-
- Support file and folder sharing (accessible without logging in)
27-
- Support document preview and audio and video playback
28-
- Support multi-user storage space control
29-
- Support multiple languages
22+
### 特色
23+
- 完全不受服务器带宽限制
24+
- 支持所有兼容S3协议的云存储
25+
- 支持文件及文件夹管理
26+
- 支持文件及文件夹分享(未登录可访问)
27+
- 支持文档预览及音视频播放
28+
- 支持多用户存储空间控制
29+
- 支持多语言
3030

31-
### Why Not ...?
31+
### 为什么不是...
3232

3333
#### NextCloud
34-
NextCloud is a very easy to use network disk system. It can be said to be the predecessor in this field. But because it was born relatively early, it was designed base on the local file system. The speed of file transfer is limited by the speed of local network. This means that if you use NextCloud to build a network disk on a server with a bandwidth of one megabyte, the upper bound of the upload and download speed of the network disk is only one megabyte. If you want to increase the speed, you can only upgrade the bandwidth of the server, which is a big cost.
34+
NextCloud是非常好用的网盘系统,可以说是这个领域的前辈了。但是由于它诞生的比较早,在设计上它是基于本地文件系统进行存储的。这就意味着如果您使用NextCloud在一台一兆带宽的服务器上搭建一个网盘,那么网盘的上传下载速度上限就只有一兆,如果您想提升速度就只能给服务器升级带宽,这将是很大的成本。
35+
36+
当然,有人可能会说NextCloud也可以用云存储啊。但其实它是通过将云存储挂载成本地磁盘的方式进行使用的,还是无法解决上传下载速度受限于服务器带宽的问题。
3537

3638
#### Cloudreve
3739

38-
Cloudreve is the only product I found before developing ZPan that meets my needs (uploads and downloads are not limited by bandwidth). However, Cloudreve was developed based on PHP at the time, and I was a bit disgusted about that it was troublesome to deploy, so I wanted to implement one by myself in Golang. However, due to some reasons, it was put on hold for more than a year. When I restarted ZPan and it was almost finished, I realized that Cloudreve also used Golang for refactoring during this year.
40+
Cloudreve是我在研发ZPan之前找到的唯一满足我需求(上传下载不受带宽限制)的产品。但是当时Cloudreve是基于PHP开发的,我有点嫌弃它部署起来比较麻烦,所以就想着用Golang自己实现一个。但是由于一些原因,中途搁置了一年多,当我重新开始搞ZPan且已经差不多搞完的时候才发现在这一年中Cloudreve也使用Golang进行重构了。
3941

40-
It is undeniable that Cloudreve has more functions than ZPan does. ZPan will be more restrained in features, as I always believe that more features are not always better. So, if you find that ZPan does not meet your needs, you can also try Cloudreve.
42+
不可否认Cloudreve在功能上是比ZPan更加多的,ZPan在功能上会比较克制,因为我始终认为功能不是越多越好。所以如果您发现ZPan不满足您的需求,也可以去试试Cloudreve。
4143

42-
#### EyeblueTank
44+
#### 蓝眼云盘
4345

44-
Blue Eye Cloud Disk was also found when I was looking for online storage products in the early days. Generally speaking, it fits my vision and is simple and easy to use. Unfortunately, it also belongs to the traditional network disk. I have communicated with his developers, and they have no plans to support cloud storage.
46+
蓝眼云盘也是我早期在找网盘产品的时候找到的,总体来说他符合我的设想,简单好用。但很遗憾,他也属于传统网盘,我和他的开发者有过交流,他们并没有打算支持云存储。
4547

4648
#### Z-File
4749

48-
Z-File is an online file catalog program that supports various object storage and local storage. Its target is to be a commonly used tools by individuals for downloading, or a public file library. It will not be developed in the direction of multiple accounts.
50+
Z-File是一个在线文件目录的程序, 支持各种对象存储和本地存储, 使用定位是个人放常用工具下载, 或做公共的文件库. 不会向多账户方向开发.
51+

docs/_navbar.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
* [English](/)
2-
* [中文](/zh-cn/)
1+
* [中文](/)
2+
* [English](/en/)

docs/_sidebar.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
* [Introduction](/)
2-
* [Getting Started](/getting-started.md)
3-
* [Config](/config.md)
4-
* [Cloud Storage](/cloud-platform.md)
5-
* [Contributing](/contributing.md)
6-
* [Vernacular](/vernacular.md)
7-
* [FAQ](/faq.md)
1+
* [介绍](/)
2+
* [快速开始](/getting-started.md)
3+
* [配置文件](/config.md)
4+
* [云存储](/cloud-platform.md)
5+
* [贡献代码](/contributing.md)
6+
* [白话文教程](/vernacular.md)
7+
* [常见问题](/faq.md)

docs/cloud-platform.md

Lines changed: 67 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,75 @@
1-
> Here we provide different endpoint samples for each major platform, you need to change `my-zpan-bucket` to your own bucket name
1+
## S3协议平台
22

3-
## Endpoint
3+
- 阿里云OSS
4+
- 腾讯云COS
5+
- 七牛云Kodo
6+
- UCloud(需手动自动设置CORS)
7+
- 华为云OBS
8+
- 网易云NOS(需手动自动设置CORS)
9+
- 亚马逊S3
10+
- MinIO
411

5-
- AmazonS3:`s3.ap-northeast-1.amazonaws.com`
6-
- TencentCOS:`cos.ap-shanghai.myqcloud.com`
7-
- AliyunOSS:`oss-cn-zhangjiakou.aliyuncs.com`
8-
- QiniuKodo:`s3-cn-east-1.qiniucs.com`
9-
- GoogleStorage:`storage.googleapis.com`
12+
> 路径:管理后台-存储管理-创建存储
1013
11-
## CORS
14+
### 基础配置
15+
16+
<img src="https://static.saltbo.cn/images/image-20210712165603221.png" alt="image-20210712165603221" style="zoom:50%;" />
17+
18+
1. 网盘和外链盘的区别是:外链盘可以直接拿到永久外链,同时它没有分享和回收站的功能
19+
2. 名称是在zpan中该存储的名字,同时也是路由地址,所以只支持英文
20+
3. 云平台的数据来源于 https://github.com/eplist/eplist ,欢迎PR
21+
4. 接入点的数据同样源于eplist,选择一个云平台后会自动给出该平台的所有Endpoint
22+
23+
### 高级配置
24+
25+
![image-20210712170751044](https://static.saltbo.cn/images/image-20210712170751044.png)
26+
27+
1. 高级配置默认都可为空
28+
2. 标题可以是中文,用于在页面顶部的导航栏显示
29+
3. 自有域名即用来访问/下载资源的域名
30+
4. 存储根路径指的是在云存储里的存储路径,默认是根目录,指定一个前缀,可以实现共用一个bucket的场景
31+
5. 文件存储路径指的是上传的文件在云存储里的存储路径,默认是$NOW_DATE/$RAND_16KEY.$RAW_EXT
32+
6. 可以看到我们支持一些系统变量,通过这些变量你可以设置自己的路径规则
33+
34+
### CORS配置
1235

1336
- Origin: http://your-domain
1437
- AllowMethods: PUT
1538
- AllowHeaders: content-type,content-disposition,x-amz-acl
1639

17-
### S3
18-
The permissions of s3 are more complicated, and I have not conducted detailed tests. At present, I directly turn off the option of `Block public access to buckets and objects granted through new access control lists (ACLs)`; then configure the following CORS Just fill in and save.
19-
```json
20-
[
21-
{
22-
"AllowedOrigins": [
23-
"http://your-domain"
24-
],
25-
"AllowedMethods": [
26-
"PUT"
27-
],
28-
"AllowedHeaders": [
29-
"content-type",
30-
"content-disposition",
31-
"x-amz-acl"
32-
],
33-
"ExposeHeaders": []
34-
}
35-
]
36-
```
37-
38-
### Storage
39-
Since Google Cloud Storage does not provide a visual configuration interface, only a command line tool, so we can use CloudShell to operate, the specific commands are as follows:
40-
```bash
41-
echo '[{"origin":["*"],"method":["PUT"],"responseHeader":["content-type","content-disposition","x-amz-acl"]}]' > cors.json
42-
gsutil cors set cors.json gs://your-bucket-name
43-
```
44-
45-
### Others
46-
OSS, COS, Kodo and other visualizations are all very good, so don’t talk nonsense, if you really don’t know how to do it, you can watch [Vernacular](/vernacular)
40+
41+
42+
## MinIO
43+
44+
基于MinIO可以快速搭建自己的私有云。
45+
46+
需要注意的是,我们仅支持Virtual Hosted-Style模式的S3协议,所以在MinIO搭建时需要注意开启Virtual Hosted-Style。
47+
48+
启用的方式很简单,即设置环境变量MINIO_DOMAIN=endpoint.example.com
49+
50+
当您创建一个bucket名叫zpan时,它的完整域名是zpan.endpoint.example.com
51+
52+
但是,注意,**zpan中需要您填写的接入点是不包含bucket的,所以您应该填写endpoint.example.com**
53+
54+
55+
56+
#### 参考文档:
57+
58+
- https://docs.min.io/docs/minio-server-configuration-guide.html
59+
- https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAPI.html
60+
61+
62+
63+
64+
65+
## 又拍云
66+
67+
!> 又拍云不兼容s3协议,所以和其他平台有一些区别,需要特别注意
68+
69+
1. Endpoint填写又拍云默认分配的加速域名(仅供测试那个)
70+
2. AccessKey为操作员名称,AccessSecret为操作员密码
71+
3. **如果是网盘类型,需要将Token防盗链的秘钥设置为操作员的密码**
72+
73+
![image-20210712172027775](https://static.saltbo.cn/images/image-20210712172027775.png)![image-20210712172346760](https://static.saltbo.cn/images/image-20210712172346760.png)
74+
75+
![image-20210712172707803](https://static.saltbo.cn/images/image-20210712172707803.png)

docs/config.md

Lines changed: 10 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,32 @@
1-
# debug
2-
Whether to output the debug log, the default is false
1+
# 配置文件
32

4-
# invitation
5-
Whether invitation registration is enabled, after enabling, only invitation registration is allowed, and it is disabled by default
3+
从v1.5.0版本开始,我们启用了可视化的安装流程,初次安装完成后会生成config.yml的配置文件。如果您需要修改端口或者数据库配置,可以打开该文件进行编辑修改。
64

7-
# storage
8-
The initial space allocated to each user, default 50 megabytes, unit: byte
5+
## port
6+
Http端口,默认为8222
97

10-
# server
11-
Configure the server
12-
```yaml
13-
server:
14-
port: 8222
15-
sslport: 443
16-
domain:
17-
- example1.com
18-
- example2.com
19-
```
20-
21-
### port
22-
Http port
23-
24-
### sslport
25-
Https port, only support 443 at the moment
26-
27-
### domain
28-
Domain list of the server
29-
30-
# tls
31-
Configure the tls
32-
```yaml
33-
tls:
34-
enabled: true
35-
auto: true
36-
cacheDir: /opt/
37-
certPath: "/etc/domain/cert.pem"
38-
certkeyPath: "/etc/domain/cert.key"
39-
```
40-
41-
### enable
42-
Whether to enable https
43-
44-
### auto
45-
Whether to auto https using let's encrypt
46-
47-
### cacheDir
48-
Let's encrypt cert cache dir, need write permission
49-
50-
### certPath
51-
Manually set cert
52-
53-
### certkeyPath
54-
Manually set certkey
55-
56-
# database
57-
The database driver of ZPan is defined here
8+
## database
9+
这里定义了ZPan的数据库驱动
5810
```yaml
5911
database:
6012
driver: sqlite3
6113
dsn: zpan.db
6214
```
6315
64-
### driver
65-
We support four database drivers, you can choose according to your needs
16+
### driver
17+
我们支持四种数据库驱动,您可以根据需求进行选择
6618
6719
- sqlite3
6820
- mysql
6921
- postgres
7022
- mssql
7123
7224
### dsn
73-
The dsn corresponding to different drivers is also different, here we give the dsn format of each driver separately
25+
不用的驱动对应的dsn也是不一样的,这里我们分别给出每种驱动的dsn格式
7426
7527
| driver | dsn |
7628
| ---- | ---- |
7729
| sqlite3 | zpan.db |
7830
| mysql | user:pass@tcp(127.0.0.1:3306)/zpan?charset=utf8mb4&parseTime=True&loc=Local |
7931
| postgres | user=zpan password=zpan dbname=zpan port=9920 sslmode=disable TimeZone=Asia/Shanghai |
80-
| mssql | sqlserver://zpan:LoremIpsum86@localhost:9930?database=zpan |
81-
82-
# provider
83-
Currently we support all S3-based cloud storage platforms, such as Alibaba Cloud OSS, Tencent Cloud COS, Qiniu Cloud KODO.
84-
```yaml
85-
provider:
86-
name: s3
87-
bucket: saltbo-zpan-test
88-
endpoint: https://oss-cn-zhangjiakou.aliyuncs.com
89-
accessKey: LTAIxxxxxxxxxxxxxxx7YoV
90-
accessSecret: PFGVwxxxxxxxxxxxxxxxxRd09u
91-
```
92-
93-
### name
94-
The name of the cloud storage you use, the options are as follows
95-
- s3(default)
96-
- od(Not currently supported)
97-
- gd(Not currently supported)
98-
99-
### bucket
100-
The name of the storage space you created
101-
102-
### endpoint
103-
Access point for cloud storage
104-
105-
### customHost
106-
Custom domain name bound to cloud storage
107-
108-
### accessKey
109-
Access key requested from cloud storage
110-
111-
### accessSecret
112-
Access secret requested from cloud storage
113-
114-
# email
115-
Configure the email address to open the account registration email verification
116-
```yaml
117-
email:
118-
host: smtpdm.aliyun.com:25
119-
sender: no-reply@saltbo.fun
120-
username: Zpan
121-
password: mGxxxxxxxxxxh9
122-
```
123-
124-
### host
125-
Mailing service address,eg:: smtpdm.aliyun.com:25
126-
127-
### sender:
128-
Mailing address,eg:no-reply@saltbo.fun
129-
130-
### username
131-
Sender,eg:Zpan
132-
133-
### password
134-
Sending password
32+
| mssql | sqlserver://zpan:LoremIpsum86@localhost:9930?database=zpan |

0 commit comments

Comments
 (0)