Skip to content

Commit a18306f

Browse files
authored
Some miscellaneous changes (#419)
* some miscellaneous changes * fix(offline-download): the case issue of docker volume mapping path of qBittorrent * feat(ftp-server): local proxy tip
1 parent c2624af commit a18306f

File tree

12 files changed

+268
-117
lines changed

12 files changed

+268
-117
lines changed

docs/guide/advanced/ftp.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ star: true
2020

2121
# FTP / SFTP
2222

23+
::: tip
24+
25+
所有在网页端管理页面对 FTP 相关配置进行的调整必须重启 AList 才会生效。
26+
27+
使用 FTP 下载时只会使用本地代理。
28+
29+
:::
30+
2331
## **FTP 配置文件**
2432

2533
| 字段 | 含义 | 示例值 |
@@ -37,31 +45,33 @@ star: true
3745

3846
## **FTP 设置**
3947

40-
在了解 FTP 的设置选项前需要先了解 FTP 协议的工作方式,FTP 协议传输文件有“主动传输”和“被动传输”两种方式:
48+
在了解 FTP 的设置选项前需要先了解 FTP 协议的工作方式,FTP 协议使用**两个 TCP 连接**进行交互,它们分别被称为“**控制流**”和“**数据流**”,21 号端口是 FTP 协议的默认控制流端口号,FTP 服务器会持续监听这一端口号等待客户端的连接并给出响应,**控制流只传输客户端的请求指令和服务端的错误信息,不传输文件内容和文件列表**。在 AList 中,控制流端口号由配置文件内的`listen`参数确定,默认为 5221,客户端必须能够访问服务端的这一端口,协议才可以正常工作。
49+
50+
而数据流的建立主要有两种方式,被称为“主动模式”和“被动模式”:
51+
52+
在主动模式下,客户端主动监听一个端口,并通过`PORT`指令将端口号发送给服务端,服务端主动连接客户端并传输文件或文件列表。在这种模式下,客户端需要能够被服务端直接访问,因此在当前 NAT 普及的情况下几乎只有服务端和客户端处在同一子网内时才能发挥作用。
4153

4254
```mermaid
4355
---
4456
title: 主动模式
4557
---
4658
sequenceDiagram
47-
客户端->>服务端: 发送PORT指令,携带客户端的IP地址和传输数据流的端口
48-
服务端->>客户端: 主动连接客户端
59+
客户端->>服务端: 控制流发送PORT指令,携带客户端的IP地址和数据流端口号
60+
服务端->>客户端: 主动连接客户端,在新建立的连接(数据流)中传输文件或文件列表
4961
```
5062

51-
在主动模式下,客户端需要能够被服务端直接访问,因此在当前 NAT 普及的情况下几乎只有服务端和客户端处在同一子网内时才能发挥作用
63+
在被动模式下,客户端首先在控制流中发送`PASV``EPSV`命令,要求服务端新监听一个数据流端口,服务端在控制流中向客户端返回新监听的端口的端口号,待客户端与该端口建立连接以后再进行数据传输。在这种模式下,服务端不主动向客户端发起连接,因此只需要服务端处在 NAT 之外即可,但因为被动传输的传输端口不是预先确定,而是在连接发起前才确定的,因此在面对服务端和客户端之间存在端口映射,或服务端仅有一部分端口允许客户端连接的复杂网络环境时就需要额外配置
5264

5365
```mermaid
5466
---
5567
title: 被动模式
5668
---
5769
sequenceDiagram
58-
客户端->>服务端: 发送PASV或EPSV指令
70+
客户端->>服务端: 控制流发送PASV或EPSV指令
5971
服务端-->>客户端: 服务端的公网IP(仅PASV)和用于传输数据的被动传输端口号
60-
客户端->>服务端: 向服务端返回的IP和端口发起TCP连接
72+
客户端->>服务端: 向服务端返回的IP和端口发起TCP连接,在新建立的连接(数据流)中传输文件或文件列表
6173
```
6274

63-
在被动模式下,服务端不主动向客户端发起连接,因此只需要服务端处在 NAT 之外即可,但因为被动传输的传输端口不是预先确定,而是在连接发起前才确定的,因此在服务端和客户端之间存在端口映射的复杂网络环境时就需要额外配置。
64-
6575
- FTP 服务端公网地址
6676

6777
`PASV`命令中服务端向客户端发送的 IP 地址,如果服务端和客户端在同一子网内,用服务端的内网 IP 地址也可以,甚至如果服务端和客户端是同一台主机,也可以使用`127.0.0.1`。但如果服务端和客户端不在同一子网内,则需要填写能够让客户端访问到的服务端 IP 地址。
@@ -120,7 +130,21 @@ sequenceDiagram
120130
端口映射->>服务端: 转发到2000端口
121131
```
122132

123-
133+
如果服务器与客户端之间存在多层端口映射,`:`之前只需要填写最靠近客户端的端口号,之后只需要填写最靠近服务端的端口号即可,比如以下场景填写`2000:5000`
134+
135+
```mermaid
136+
sequenceDiagram
137+
participant 客户端
138+
participant 内网穿透服务
139+
participant 软路由端口转发
140+
participant Docker 容器端口映射
141+
participant AList 进程
142+
143+
客户端->>内网穿透服务: 2000
144+
内网穿透服务->>软路由端口转发: 3000
145+
软路由端口转发->>Docker 容器端口映射: 4000
146+
Docker 容器端口映射->>AList 进程: 5000
147+
```
124148

125149
- FTP 代理 User-Agent 请求头
126150

docs/guide/advanced/offline-download.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Then find the offline download button in the lower right corner, and choose to u
3535
If you use **docker**, please map the following two default paths by yourself. (mapped to the same directory on the host machine)
3636

3737
- **/opt/alist/data/temp/aria2**
38-
- **/opt/alist/data/temp/qbittorrent**
38+
- **/opt/alist/data/temp/qBittorrent**
3939

4040
:::
4141

docs/guide/api/task.md

Lines changed: 45 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ star: true
2020

2121
alist中的任务管理可以分为:
2222

23-
| 接口名 | 说明 |
24-
| -------------------------- | ---------------- |
25-
| /upload | 上传任务 |
26-
| /copy | 复制任务 |
23+
| 接口名 | 说明 |
24+
| -------------------------- | ------------- |
25+
| /upload | 上传任务 |
26+
| /copy | 复制任务 |
2727
| /offline_download | 离线下载任务 |
2828
| /offline_download_transfer | 离线下载转存任务 |
29+
| /decompress | 解压任务 |
30+
| /decompress_upload | 解压转存任务 |
2931

3032
每种任务都有以下接口:
3133

@@ -65,7 +67,7 @@ POST /api/task/upload/info
6567
"message": "success",
6668
"data": [
6769
{
68-
"id": "1",
70+
"id": "WC7gsoTr5CHkExN9dmyxs",
6971
"name": "upload 1.png to [/s](/test)",
7072
"creator": "admin",
7173
"creator_role": 2,
@@ -97,7 +99,7 @@ POST /api/task/upload/info
9799
| » message | string | true | none | 信息 | none |
98100
| » data | [object] | true | none | | none |
99101
| »» id | string | false | none | id | none |
100-
| »» name | string | false | none | 任务名 | none |
102+
| »» name | string | false | none | 任务名 | 任务的命名方式见本文末尾 |
101103
| »» creator | string | false | none | 任务创建者用户名 | none |
102104
| »» creator_role | integer | false | none | 任务创建者角色 | 0: 普通用户,1: 访客,2: 管理员 |
103105
| »» state | string | false | none | 任务完成状态 | none |
@@ -128,7 +130,7 @@ GET /api/task/upload/done
128130
"message": "success",
129131
"data": [
130132
{
131-
"id": "1",
133+
"id": "WC7gsoTr5CHkExN9dmyxs",
132134
"name": "upload 1.png to [/s](/test)",
133135
"creator": "example_user",
134136
"creator_role": 0,
@@ -160,7 +162,7 @@ GET /api/task/upload/done
160162
| » message | string | true | none | 信息 | none |
161163
| » data | [object] | true | none | | none |
162164
| »» id | string | false | none | id | none |
163-
| »» name | string | false | none | 任务名 | none |
165+
| »» name | string | false | none | 任务名 | 任务的命名方式见本文末尾 |
164166
| »» creator | string | false | none | 任务创建者用户名 | none |
165167
| »» creator_role | integer | false | none | 任务创建者角色 | 0: 普通用户,1: 访客,2: 管理员 |
166168
| »» state | string | false | none | 任务完成状态 | none |
@@ -191,7 +193,7 @@ GET /api/task/upload/undone
191193
"message": "success",
192194
"data": [
193195
{
194-
"id": "1",
196+
"id": "WC7gsoTr5CHkExN9dmyxs",
195197
"name": "upload 1.png to [/s](/test)",
196198
"creator": "guest",
197199
"creator_role": 1,
@@ -223,7 +225,7 @@ GET /api/task/upload/undone
223225
| » message | string | true | none | 信息 | none |
224226
| » data | [object] | true | none | | none |
225227
| »» id | string | false | none | id | none |
226-
| »» name | string | false | none | 任务名 | none |
228+
| »» name | string | false | none | 任务名 | 任务的命名方式见本文末尾 |
227229
| »» creator | string | false | none | 任务创建者用户名 | none |
228230
| »» creator_role | integer | false | none | 任务创建者角色 | 0: 普通用户,1: 访客,2: 管理员 |
229231
| »» state | string | false | none | 任务完成状态 | none |
@@ -608,3 +610,36 @@ POST /api/task/upload/retry_some
608610
| » message | string | true | none | 信息 | none |
609611
| » data | object | true | none | | 不在此对象中的任务表示重试成功且无错误信息 |
610612
| »» 任务id | string | false | none | 错误信息 | none |
613+
## 备注
614+
615+
### 任务的命名方式
616+
617+
- 上传:
618+
```text
619+
upload 文件名 to [驱动挂载点](驱动内路径)
620+
```
621+
- 复制:
622+
```text
623+
copy [源文件驱动挂载点](源文件驱动内路径) to [目标驱动挂载点](目标驱动内路径)
624+
```
625+
- 离线下载:
626+
```text
627+
download 文件名 to (目标路径)
628+
```
629+
- 离线下载转存:
630+
- 驱动离线下载:
631+
```text
632+
transfer [源文件驱动挂载点](源文件挂载点) to [目标驱动挂载点](目标驱动内路径)
633+
```
634+
- 本地离线下载:
635+
```text
636+
transfer [](源文件本地路径) to [目标驱动挂载点](目标驱动内路径)
637+
```
638+
- 解压:
639+
```text
640+
decompress [源文件驱动挂载点](源文件驱动内路径)[压缩文件内部路径] to [目标驱动挂载点](目标驱动内路径) with password <解压密码>
641+
```
642+
- 解压转存:
643+
```text
644+
upload 文件名 to [驱动挂载点](驱动内路径)
645+
```

docs/guide/drivers/github.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,36 @@ The name of the repository. For example, if the URL of the repository is `github
4545

4646
A branch, a tag or a commit SHA. Only when a branch name is filled in is the driver writable. It defaults to the default branch if not filled.
4747

48+
## **Gh Proxy**
49+
50+
Used to speed up downloading
51+
52+
- Download the content of `Raw` and `archive` and change it to **https://gh-proxy.com/raw.githubusercontent.com**
53+
54+
```bash title="Copy"
55+
https://gh-proxy.com/raw.githubusercontent.com
56+
```
57+
58+
```bash title="Copy"
59+
https://ghfast.top/raw.githubusercontent.com
60+
```
61+
62+
```bash title="Copy"
63+
https://ghproxy.net/raw.githubusercontent.com
64+
```
65+
66+
## **GPG private key**
67+
68+
GPG private key, used to provide commit verifications. Verified commits will be marked with a green "Verified" label on the GitHub webpage. Use the following command to obtain it. Leave blank if verifications are not needed.
69+
70+
```bash
71+
gpg --export-secret-key -a <Key Pair ID>
72+
```
73+
74+
## **GPG key passphrase**
75+
76+
Passphrase to the GPG private key. Leave blank if there is none.
77+
4878
## **Committer name**
4979

5080
Custom committer name, defaulting to the owner's of the token when not filled.
@@ -76,32 +106,6 @@ Custom commit message, supporting the following template variables:
76106
- `TargetName`: (when renaming) new name. (when copying and moving) the target folder name.
77107
- `TargetPath`: (when renaming) new path. (when copying and moving) the target path.
78108

79-
<br/>
80-
81-
82-
83-
## **Gh Proxy**
84-
85-
Used to speed up downloading
86-
87-
- Download the content of `Raw` and `archive` and change it to **https://gh-proxy.com/raw.githubusercontent.com**
88-
89-
```bash title="Copy"
90-
https://gh-proxy.com/raw.githubusercontent.com
91-
```
92-
93-
```bash title="Copy"
94-
https://ghfast.top/raw.githubusercontent.com
95-
```
96-
97-
```bash title="Copy"
98-
https://ghproxy.net/raw.githubusercontent.com
99-
```
100-
101-
102-
103-
<br/>
104-
105109
### **The default download method used**
106110

107111
```mermaid

docs/guide/drivers/s3.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,52 +21,65 @@ star: true
2121

2222
S3 object storage protocols, such as COS, OSS, B2, etc.
2323

24-
### **BucKet**
24+
## **Bucket**
2525

2626
bucket name
2727

28-
### **Endpoint**
28+
## **Endpoint**
2929

3030
Endpoint address (If you don’t know, you can read the official documents below)
3131

32-
### **Region**
32+
## **Region**
3333

3434
area (If you don’t know, you can read the official documents below)
3535

36-
### **Access key id**
36+
## **Access key id**
3737

3838
Access key id
3939

40-
### **Secret access key**
40+
## **Secret access key**
4141

4242
Secret access key
4343

4444
## **Session token**
4545

4646
Session token,Normally, the three-segment token needs to be used, and the two-segment token does not need to fill in this option.
4747

48-
### **Root folder path**
48+
## **Custom host**
4949

50-
Root path, if not filled, it defaults to the root directory.
50+
Custom cdn acceleration domain name
5151

52-
### **Custom Host**
52+
## **Enable custom host presign**
5353

54-
Custom cdn acceleration domain name
54+
When "Custom host" is left blank, this option does not function.
55+
56+
When disabled: The returned URL does not include signature, which is suitable for cases where the custom host is a CDN.
5557

56-
### **Sign url expire**
58+
When enabled: The returned URL includes signature, which is suitable for cases where the host and OSS are from the same data center, the Endpoint is an internal access domain within the data center, and the custom host is an external access domain.
59+
60+
## **Sign url expire**
5761

5862
The validity period of the signed download address is 4 hours by default. If a custom accelerated domain name is used, this option is invalid.
5963

60-
### **Placeholder**
64+
## **Placeholder**
65+
6166
The name of placeholder file.
6267

63-
### **Force path style**
68+
## **Force path style**
69+
6470
If enable ForcePathStyle, usually needed for minio.
6571

66-
### **List object version**
72+
## **List object version**
73+
6774
Refer to s3 sdk documents.
6875

76+
## **Remove bucket**
77+
78+
Remove bucket name from path when using custom host.
79+
80+
## **Add filename to disposition**
6981

82+
Add filename to Content-Disposition header.
7083

7184
## **Add object storage examples and official documents**
7285

docs/guide/webdav.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ star: true
2929

3030
- If you want to add, delete or modify files, you need to open `Webdav manage` permissions and also need `Make dir or upload`, `Delete`, `Rename`, `Move`, `Copy` and other permissions. You can selectively open them according to your needs.
3131

32+
Besides, since v3.42.0, writing to WebDAV not only requires the `Webdav Manage` permission but also basic permissions such as `rename`, `delete`, and `copy`.
33+
3234
:::
3335

3436
<br/>

0 commit comments

Comments
 (0)