Skip to content

Commit

Permalink
[translation: en] update english translation of configuration.md (#277)
Browse files Browse the repository at this point in the history
* configuration.md part 1

* configuration.md part 2

* update
  • Loading branch information
Ujhhgtg authored Oct 14, 2023
1 parent 1e68f0b commit efd9acf
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 54 deletions.
102 changes: 50 additions & 52 deletions docs/config/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ star: true
### **Initial config**

::: tip
After modifying the configuration file in `config.json`, you need to restart AList to take effect
After modifying the configuration file, restart AList for changes to take effect

- Windows/Mac: `data/config.json` in the same level folder as AList
- Linux: One-click Script /opt/alist/data/config.json, manually install /xx-path/`data/config.json`
- Docker: Enter the docker container, `data/config.json`
- openwrt: If you use `Luci-APP-Alist`, please modify on the webpage,other Please find the AList execution file, the same level directory `data/config.json`
- Other: Find the `data/config.json` in AList executing files
- Windows/MacOS: `<alist dir>/data/config.json`
- Linux: one-click script directory, `/opt/alist/data/config.json` or `<alist dir>/data/config.json`
- Docker: `<docker container dir>/data/config.json`
- openwrt: modify config on server if using `luci-app-alist` , otherwise `<alist dir>/data/config.json`
- Other: `<alist dir>/data/config.json`

:::

Expand Down Expand Up @@ -75,40 +75,39 @@ After modifying the configuration file in `config.json`, you need to restart ALi
}
```

## Field Description
## Field Explanation

### **force**

The program will preferentially read the configuration from the environment variable, set `force` to `true` to force the program to read the configuration file.
By default AList reads the configuration from environment variables, set this field to `true` to force AList to read config from the configuration file.

### **site_url**

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:
The address of your AList server, such as `https://pan.nn.ci`. This address is essential for some features, and thus thry may not work properly if unset:

- thumbnail of `LocalStorage`
- Preview after opening web proxy
- The download address after opening the web proxy
- Reverse proxy to sub directory
- thumbnailing `LocalStorage`
- previewing site after setting web proxy
- displaying download address after setting web proxy
- reverse-proxying to site sub directories
- ...

Please do not include `/` at the end of the URL link, refer to the following example, otherwise the above function will also not be available or exceptions will occur
Do not include the slash \(`/`\) at the end of the address. For example:

```json
# Correct way of writing:
# correct:
"site_url": "https://al.nn.ci",
# Wrong way of writing:
# incorrect (exceptions occur):
"site_url": "https://al.nn.ci/",
```

### **cdn**

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`
This is dynamic and changeable. Existing dist resources are hosted on both npm and GitHub, and their locations are:
The address of the CDN. Included `$version` values will be dynamically replaced by the version of AList. Existing dist resources are hosted on both npm and GitHub, which can be found at:

- https://www.npmjs.com/package/alist-web
- https://github.com/alist-org/web-dist

So you can use any npm or github cdn as the path, for example:
Thus it is possible to use any npm or GitHub CDN path for this field. For example:

- https://registry.npmmirror.com/alist-web/$version/files/dist/
- https://cdn.jsdelivr.net/npm/alist-web@$version/dist/
Expand All @@ -120,21 +119,21 @@ So you can use any npm or github cdn as the path, for example:
- https://jsd.onmicrosoft.cn/npm/alist-web@$version/dist/
- https://jsd.onmicrosoft.cn/gh/alist-org/web-dist@$version/dist/

Also you can keep it empty to use local dist.
Keep empty to use local dist resources.

### **jwt_secret**

The secret used to sign the JWT token, random generated first time start.
The secret used to sign the JWT token, randomly generated on first run.

### **token_expires_in**

User login expiration time, unit: `hours`.
User login expiration time, in hours.

### **database**

The database configuration, the default is `sqlite3`, you can also use `mysql` or `postgres`.
The database configuration, which is by default `sqlite3`. Available options are `sqlite3`, `mysql` and `postgres`.

- If you do not use `MySQL` or `postgres`, the configuration file database options do not need to be modified
- The database options do not need to be modified if using `sqlite3`.

```json
"database": {
Expand All @@ -150,48 +149,48 @@ The database configuration, the default is `sqlite3`, you can also use `mysql` o
},
```

:::: details Expand to view `ssl_mode` parameter options
:::: details Expand to view details of `ssl_mode`

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
Leave blank if you do not understand what this is; no effective help can be given easily.

---

In MySQL, the `ssl_mode` parameter is used to specify the authentication mode of the SSL connection. Here are a few common options:

- `DISABLED`: Disable SSL connections.
- `PREFERRED`: If the server has SSL enabled, use an SSL connection; otherwise use a normal connection.
- `REQUIRED`: Must use SSL connection, if the server does not support SSL connection, the connection will fail.
- `VERIFY_CA`: Must use SSL connection and verify the authenticity of the server certificate.
- `VERIFY_IDENTITY`: must use an SSL connection and verify the authenticity of the server certificate and that the name matches the connecting hostname.
- `PREFERRED`: Use an SSL connection if server has SSL enabled, and otherwise fallback to a normal connection.
- `REQUIRED`: Force to use SSL connection and fail if the server does not support SSL connection.
- `VERIFY_CA`: Force to use SSL connection and verify the authenticity of the server certificate.
- `VERIFY_IDENTITY`: Force to use an SSL connection and verify the authenticity of the server certificate and that the name matches the connecting hostname.

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.
Additional, MySQL 5.x and 8.x have differences. If you are using databases provided by service providers, BTFM. If you deployed the database yourself, STFW.

---

In PostgreSQL, the `ssl_mode` parameter is used to specify how the client uses SSL connections. Here are a few common options:

- `disable`: Disable SSL connections.
- `allow`: SSL connections are allowed, but not required.
- `prefer`: If the server has SSL enabled, use an SSL connection; otherwise use a normal connection.
- `require`: Must use SSL connection, if the server does not support SSL connection, the connection will fail.
- `verify-ca`: Must use SSL connection and verify the authenticity of the server certificate.
- `verify-full`: MUST connect using SSL and verify the authenticity and name of the server certificate matches the connected hostname.
- `allow`: Allow SSL connections.
- `prefer`: Use an SSL connection if server has SSL enabled, and otherwise fallback to a normal connection.
- `require`: Force to use SSL connection and fail if the server does not support SSL connection.
- `verify-ca`: Force to use SSL connection and verify the authenticity of the server certificate.
- `verify-full`: Force to use an SSL connection and verify the authenticity of the server certificate and that the name matches the connecting hostname.

---

::: right

:warning::warning:**The above parameters are from ChatGPT, the authenticity/practicability/accuracy has not been verified**:warning::warning:
:warning::warning:**The above information is from ChatGPT, so the accuracy has not been verified**:warning::warning:

:::

::::

### **scheme**

The scheme configuration, if you want to use https, you can set this field.
The configuration of scheme. Set this field if using HTTPS.

- Fill in the example: Remember to throw the certificate file into the data directory to be recognized~
- Remember to copy the certificate file to the data directory. Config example:

```json
"scheme": {
Expand All @@ -208,23 +207,23 @@ The scheme configuration, if you want to use https, you can set this field.

### **temp_dir**

The temporary directory, default `data/temp`
The directory to keep temporary files. By default AList uses `data/temp`.

::: danger
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.
temp_dir is a temporary folder exclusive to alist. In order to prevent AList from generating garbage files when being interrupted, the directory will be cleared every time AList starts, so do not store anything in this directory or map this directory & subdirectories to directories in use when using Docker.
:::

### **bleve_dir**

When you use **`bleve`** indexes, the location of the data storage
Where data is stored when using **`bleve`** index.

### **log**

The log configuration, if you want to setup the log level, you can set this field.
The log configuration. Set this field to save detailed logs of disable.

```json
"log": {
"enable": true, //Whether to turn on the log record function, the default is to open the status true
"enable": true, // Whether AList should store logs
"name": "data\\log\\log.log", //The path and name of the log file
"max_size": 10, //the maximum size of a single log file, in MB. After reaching the specified size, the file will be automatically split.
"max_backups": 5, //the number of log backups to keep. Old backups will be deleted automatically when the limit is exceeded.
Expand All @@ -235,19 +234,18 @@ The log configuration, if you want to setup the log level, you can set this fiel

### **delayed_start**

**Unit: s** (V3.19.0 new function)
**Time unit: second** (new feature of v3.19.0)

Whether to delay start, generally this function is often used in Alist to start the self -startup option

Because sometimes the network connection is slow, the driver that needs to be connected after the Alist is launched is too fast, so that it cannot be opened normally.
Whether to delay AList startup.
Generally this option is used when AList is configured to auto-start. The reason is that sometimes network takes some time to connect, so drivers requiring cannot start correctly after Alist starts.

### **max_connections**

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

- 10 or 20 is recommended for general equipment such as n1
- Use scenarios (for example, if the picture mode is turned on, the device will crash if the concurrency is not very good)
- 10 or 20 is recommended for general devices such as n1.
- Usage Scenarios: the device will crash if the device is bad at concurrency when picture mode is enabled.

### **tls_insecure_skip_verify**

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
Whether not to verify the SSL certificate. If there is a problem with the certificate of the website used when this option is not enabled (such as not including the intermediate certificate, having the certificate expired, or forging the certificate, etc.), the service will not be available. Run the program in a safe network environment when this option is enabled.
4 changes: 2 additions & 2 deletions docs/zh/config/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ MySQL 5.x 和 8.x 也不一样。如果使用服务商提供的免费/收费数

::: right

:warning::warning:**以上参数来自 ChatGPT,未验证真实性/实用性/准确性:warning:**:warning:
:warning::warning:**以上信息来自 ChatGPT,未验证真实性/实用性/准确性:warning:**:warning:

:::

Expand Down Expand Up @@ -250,4 +250,4 @@ temp_dir 为 alist 独占的临时文件夹,为避免程序中断产生垃圾

### **tls_insecure_skip_verify**

是否检查 SSL 证书,开启后如使用的网站的证书出现问题(如未包含中级证书、证书过期、证书伪造等),将不能使用该服务,关闭该选项请尽量在安全的网络环境下运行程序
是否不检查 SSL 证书,关闭后如使用的网站的证书出现问题(如未包含中级证书、证书过期、证书伪造等),将不能使用该服务,开启该选项请尽量在安全的网络环境下运行程序

0 comments on commit efd9acf

Please sign in to comment.