Skip to content

Commit

Permalink
docs: update (#222)
Browse files Browse the repository at this point in the history
Co-authored-by: Andy Hsu <[email protected]>
  • Loading branch information
anwen-anyi and xhofe authored May 19, 2023
1 parent 609d0a7 commit 8bbc980
Show file tree
Hide file tree
Showing 123 changed files with 2,267 additions and 1,619 deletions.
92 changes: 78 additions & 14 deletions docs/config/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ sticky: true
star: true
---

### Initial config
### **Initial config**

```json
{
Expand Down Expand Up @@ -62,19 +62,19 @@ star: true

## Field Description

### force
### **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.

### address
### **address**

The address to listen on, default `0.0.0.0`

### port
### **port**

The port to listen on, default `5244`

### site_url
### **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:
- thumbnail of `LocalStorage`
Expand All @@ -83,7 +83,18 @@ The url of your `alist` site, such as `https://pan.nn.ci`.This address will be u
- Reverse proxy to sub directory
- ...

### cdn
Do not carry `/` at the end when filling in the link, otherwise it cannot be used or other problems

- 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

```json
# Correct way of writing:
"site_url": "https://pan.nn.ci",
#Wrong way of writing:
"site_url": "https://pan.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:
Expand All @@ -102,19 +113,72 @@ So you can use any npm or github cdn as the path, for example:

Also you can keep it empty to use local dist.

### jwt_secret
### **jwt_secret**

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

### token_expires_in
### **token_expires_in**

User login expiration time, unit: `hours`.

### database
### **database**

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

### scheme
- If you do not use `MySQL` or `postgres`, the configuration file database options do not need to be modified

```json
"database": {
"type": "sqlite3", //database type
"host": "", //database host
"port": 0, //database port
"user": "", //database account
"password": "", //database password
"name": "", //database name
"db_file": "data\\data.db", //Database location, used by sqlite3
"table_prefix": "x_", //database table name prefix
"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
},
```

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

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

-----

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.

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.

-----

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.

----

::: right

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

:::

::::

### **scheme**

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

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

### temp_dir
### **temp_dir**

The temporary directory, default `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.
:::

### log
### **log**

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

### max_connections
### **max_connections**

The maximum number of connections (concurrent) at the same time, the default is 0, that 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)

### tls_insecure_skip_verify
### **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
20 changes: 10 additions & 10 deletions docs/config/global.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,51 +18,51 @@ star: true

# Global settings

### Hide files
### **Hide files**

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.

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.

### Package download
### **Package download**

Whether to enable package download, default is true.

### Customize head
### **Customize head**

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

### Customize body
### **Customize body**

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

### Link expiration
### **Link expiration**

The expiration time of the direct link, in hours. If it equals 0, it will not expire. Default is 0.
::: warning
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.
:::

### Privacy regs
### **Privacy regs**

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.

### Ocr api
### **Ocr api**

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.


### Sign all
### **Sign all**

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

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.

## Forward direct link params
## **Forward direct link params**

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

### Filename char mapping
### **Filename char mapping**

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

Expand Down
8 changes: 4 additions & 4 deletions docs/config/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@ star: true

# Other settings

### Aria2
### **Aria2**

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



## Qbittorrent url
## **Qbittorrent url**

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

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)



### Token
### **Token**

The token that can be used to access all API.



### other
### **other**

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)
22 changes: 11 additions & 11 deletions docs/config/preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@ star: true

# Preview settings

### Text types
### **Text types**

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

### Audio types
### **Audio types**

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

### Video types
### **Video types**

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

### Image types
### **Image types**

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

### Proxy types
### **Proxy types**

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

### External previews
### **External previews**

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

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

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

### Iframe previews
### **Iframe previews**

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

### Audio cover
### **Audio cover**

The default audio cover.

### Audio autoplay
### **Audio autoplay**

Whether to automatically play audio files.

### Video autoplay
### **Video autoplay**

Whether to automatically play video files.

### Proxy ignore headers
### **Proxy ignore headers**

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

0 comments on commit 8bbc980

Please sign in to comment.