Skip to content

Commit 8bbc980

Browse files
anwen-anyixhofe
andauthored
docs: update (#222)
Co-authored-by: Andy Hsu <[email protected]>
1 parent 609d0a7 commit 8bbc980

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+2267
-1619
lines changed

docs/config/configuration.md

Lines changed: 78 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ sticky: true
1818
star: true
1919
---
2020

21-
### Initial config
21+
### **Initial config**
2222

2323
```json
2424
{
@@ -62,19 +62,19 @@ star: true
6262

6363
## Field Description
6464

65-
### force
65+
### **force**
6666

6767
The program will preferentially read the configuration from the environment variable, set `force` to `true` to force the program to read the configuration file.
6868

69-
### address
69+
### **address**
7070

7171
The address to listen on, default `0.0.0.0`
7272

73-
### port
73+
### **port**
7474

7575
The port to listen on, default `5244`
7676

77-
### site_url
77+
### **site_url**
7878

7979
The url of your `alist` site, such as `https://pan.nn.ci`.This address will be used in some places in the program, If you do not set this field, Some features may not work properly, such as:
8080
- thumbnail of `LocalStorage`
@@ -83,7 +83,18 @@ The url of your `alist` site, such as `https://pan.nn.ci`.This address will be u
8383
- Reverse proxy to sub directory
8484
- ...
8585

86-
### cdn
86+
Do not carry `/` at the end when filling in the link, otherwise it cannot be used or other problems
87+
88+
- Do not carry `/` at the end of the URL link, correct example:heavy_check_mark: :`https://pan.nn.ci`, wrong example: `https://pan.nn.ci/` :x:,Otherwise the following functions will not be available
89+
90+
```json
91+
# Correct way of writing:
92+
"site_url": "https://pan.nn.ci",
93+
#Wrong way of writing:
94+
"site_url": "https://pan.nn.ci/",
95+
```
96+
97+
### **cdn**
8798

8899
The CDN address, if you want to use CDN, you can set this field, the `$version` will be replaced with the real version of `alist-web`
89100
This is dynamic and changeable. Existing dist resources are hosted on both npm and GitHub, and their locations are:
@@ -102,19 +113,72 @@ So you can use any npm or github cdn as the path, for example:
102113

103114
Also you can keep it empty to use local dist.
104115

105-
### jwt_secret
116+
### **jwt_secret**
106117

107118
The secret used to sign the JWT token, random generated first time start.
108119

109-
### token_expires_in
120+
### **token_expires_in**
110121

111122
User login expiration time, unit: `hours`.
112123

113-
### database
124+
### **database**
114125

115126
The database configuration, the default is `sqlite3`, you can also use `mysql` or `postgres`.
116127

117-
### scheme
128+
- If you do not use `MySQL` or `postgres`, the configuration file database options do not need to be modified
129+
130+
```json
131+
"database": {
132+
"type": "sqlite3", //database type
133+
"host": "", //database host
134+
"port": 0, //database port
135+
"user": "", //database account
136+
"password": "", //database password
137+
"name": "", //database name
138+
"db_file": "data\\data.db", //Database location, used by sqlite3
139+
"table_prefix": "x_", //database table name prefix
140+
"ssl_mode": "" //To control the encryption options during the SSL handshake, the parameters can be searched by themselves, or check the answer from ChatGPT below
141+
},
142+
```
143+
144+
:::: details Expand to view `ssl_mode` parameter options
145+
146+
If you don’t know how to fill in, fill in the default blank, no need to modify, if you can’t use it if you don’t fill it in, do your own research, and you can’t provide much effective help
147+
148+
-----
149+
150+
In MySQL, the `ssl_mode` parameter is used to specify the authentication mode of the SSL connection. Here are a few common options:
151+
152+
- `DISABLED`: Disable SSL connections.
153+
- `PREFERRED`: If the server has SSL enabled, use an SSL connection; otherwise use a normal connection.
154+
- `REQUIRED`: Must use SSL connection, if the server does not support SSL connection, the connection will fail.
155+
- `VERIFY_CA`: Must use SSL connection and verify the authenticity of the server certificate.
156+
- `VERIFY_IDENTITY`: must use an SSL connection and verify the authenticity of the server certificate and that the name matches the connecting hostname.
157+
158+
MySQL 5.x and 8.x are also different. If you use the free/fee database provided by the service provider, the service provider will have documentation. You must know the database you deploy yourself.
159+
160+
-----
161+
162+
In PostgreSQL, the `ssl_mode` parameter is used to specify how the client uses SSL connections. Here are a few common options:
163+
164+
- `disable`: Disable SSL connections.
165+
- `allow`: SSL connections are allowed, but not required.
166+
- `prefer`: If the server has SSL enabled, use an SSL connection; otherwise use a normal connection.
167+
- `require`: Must use SSL connection, if the server does not support SSL connection, the connection will fail.
168+
- `verify-ca`: Must use SSL connection and verify the authenticity of the server certificate.
169+
- `verify-full`: MUST connect using SSL and verify the authenticity and name of the server certificate matches the connected hostname.
170+
171+
----
172+
173+
::: right
174+
175+
:warning::warning:**The above parameters are from ChatGPT, the authenticity/practicability/accuracy has not been verified**:warning::warning:
176+
177+
:::
178+
179+
::::
180+
181+
### **scheme**
118182

119183
The scheme configuration, if you want to use https, you can set this field.
120184

@@ -128,25 +192,25 @@ The scheme configuration, if you want to use https, you can set this field.
128192
},
129193
```
130194

131-
### temp_dir
195+
### **temp_dir**
132196

133197
The temporary directory, default `data/temp`
134198

135199
::: danger
136200
temp_dir is a temporary folder exclusive to alist. In order to avoid program interruption and generate garbage files, it will be cleared every time it starts, so please do not manually put any content in this folder, and do not use this folder and its subfolders when using docker Folders are mapped to folders in use.
137201
:::
138202

139-
### log
203+
### **log**
140204

141205
The log configuration, if you want to setup the log level, you can set this field.
142206

143-
### max_connections
207+
### **max_connections**
144208

145209
The maximum number of connections (concurrent) at the same time, the default is 0, that is, unlimited.
146210

147211
- 10 or 20 is recommended for general equipment such as n1
148212
- Use scenarios (for example, if the picture mode is turned on, the device will crash if the concurrency is not very good)
149213

150-
### tls_insecure_skip_verify
214+
### **tls_insecure_skip_verify**
151215

152216
Whether to examine the SSL certificate, if there is a problem with the certificate of the website used after opening (such as not including the intermediate certificate, certificate expiration, certificate forgery, etc.), the service will not be available,Close this option, please try to run the program in a safe network environment

docs/config/global.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,51 +18,51 @@ star: true
1818

1919
# Global settings
2020

21-
### Hide files
21+
### **Hide files**
2222

2323
Match files hidden by regular expressions(`javascript`). If you don't understand, don't fill in them randomly. Wrong regular expressions will cause the front-end page to crash. One per line. By default, there is an example expression that hides README.md in all directories.
2424

2525
It's not really hiding. It still exists in the list returned by the api, it just doesn't show up in the frontend list. So if you want to really hide, add a [meta](../guide/advanced/meta.md) record instead.
2626

27-
### Package download
27+
### **Package download**
2828

2929
Whether to enable package download, default is true.
3030

31-
### Customize head
31+
### **Customize head**
3232

3333
Any content you want which are automatically placed at the beginning of the head of the web page
3434

35-
### Customize body
35+
### **Customize body**
3636

3737
Any content you want which are automatically placed at the end of the body of the web page
3838

39-
### Link expiration
39+
### **Link expiration**
4040

4141
The expiration time of the direct link, in hours. If it equals 0, it will not expire. Default is 0.
4242
::: warning
4343
Only the straight chain of the path with the password added will have an expiration time, otherwise it will not expire.Because the expiration time is added to the sign query parameter, and the path without adding the password will not check the sign.
4444
:::
4545

46-
### Privacy regs
46+
### **Privacy regs**
4747

4848
What you don't want to show in the error message, One regular expression (in `Golang`) per line. The matched content will be replaced with * of the corresponding length.
4949

50-
### Ocr api
50+
### **Ocr api**
5151

5252
Used to identify verification codes. You can deploy yourself: https://hub.docker.com/r/xhofe/ddddocr_server. The default ocr api is deployed on the [koyeb](https://app.koyeb.com/)(No availability guarantee), which is not recommended to use in production environment.
5353

5454

55-
### Sign all
55+
### **Sign all**
5656

5757
Add signatures to the direct link of all files (whether with password or not) That is https://xxxx.com/d/xx? ==**sign=vUQ5KFXnwMseKnIUXGRcfoG3cEHzKFBiPGp1NriMDXA=:0**==
5858

5959
If you need to close it, you can close it yourself, but you need to pay attention to security issues. After closing the signature, if the site can be accessed by the public network, the password may be bypassed to access private files.
6060

61-
## Forward direct link params
61+
## **Forward direct link params**
6262

6363
You can check it out yourself:**https://github.com/alist-org/alist/issues/3123**
6464

65-
### Filename char mapping
65+
### **Filename char mapping**
6666

6767
Mainly to map some special characters so that Alist can work normally
6868

docs/config/other.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,26 @@ star: true
1818

1919
# Other settings
2020

21-
### Aria2
21+
### **Aria2**
2222

2323
Set Aria2 uri and Aria2 for offline download. Aria2 needs to be installed on the same server(container if use docker) as alist.
2424

2525

2626

27-
## Qbittorrent url
27+
## **Qbittorrent url**
2828

2929
Used to customize **Qbittorrent** parameters to configure the client to use
3030

3131
The default value is: http://admin:adminadmin@localhost:8080/, you can modify it by referring to [specific instructions. ](../guide/advanced/offline-download.md#_2-qbittorrent)
3232

3333

3434

35-
### Token
35+
### **Token**
3636

3737
The token that can be used to access all API.
3838

3939

4040

41-
### other
41+
### **other**
4242

4343
When using it, I found that there are two Aria2, but what is the difference? [**Click to view the detailed description**](../faq/why.md#what-is-the-difference-between-the-two-aria2)

docs/config/preview.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,27 @@ star: true
1818

1919
# Preview settings
2020

21-
### Text types
21+
### **Text types**
2222

2323
The extensions of the files you want to preview as text, split by `,`, such as `txt,md,go,tsx`.
2424

25-
### Audio types
25+
### **Audio types**
2626

2727
The extensions of the files you want to preview as audio, split by `,`, such as `mp3,wav,m4a`.
2828

29-
### Video types
29+
### **Video types**
3030

3131
The extensions of the files you want to preview as video, split by `,`, such as `mp4,webm,ogg`.
3232

33-
### Image types
33+
### **Image types**
3434

3535
The extensions of the files you want to preview as image, split by `,`, such as `jpg,jpeg,png,gif,webp`.
3636

37-
### Proxy types
37+
### **Proxy types**
3838

3939
The extensions of the files you want to separately set to download through proxy
4040

41-
### External previews
41+
### **External previews**
4242

4343
A json object that contains the external preview settings, It is defined as
4444

@@ -85,7 +85,7 @@ when we enter a file with the extension `txt`, it will show:
8585

8686
![Open-with](/img/config/open-with.png)
8787

88-
### Iframe previews
88+
### **Iframe previews**
8989

9090
Similar to `External previews`, but it will embed an iframe in current page directly.
9191
:::tip
@@ -100,18 +100,18 @@ If you want to use self-deployed onlyoffice to preview office files, you can add
100100
```
101101
:::
102102

103-
### Audio cover
103+
### **Audio cover**
104104

105105
The default audio cover.
106106

107-
### Audio autoplay
107+
### **Audio autoplay**
108108

109109
Whether to automatically play audio files.
110110

111-
### Video autoplay
111+
### **Video autoplay**
112112

113113
Whether to automatically play video files.
114114

115-
### Proxy ignore headers
115+
### **Proxy ignore headers**
116116

117117
For details, please check: **https://github.com/alist-org/alist/issues/2763**

0 commit comments

Comments
 (0)