Skip to content

Commit

Permalink
docs: add whiteDownloadDirs doc
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie committed Sep 21, 2024
1 parent 2c1a5ba commit 7912841
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 27 deletions.
5 changes: 3 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ It also supports configuration through configuration files. Create a `config.jso
"username": "", // HTTP Basic Auth Username (default "gopeed")
"password": "", // HTTP Basic Auth Password
"apiToken": "", // HTTP API token, it must be configured when using HTTP API in the case of enabling basic authentication
"storageDir": "" // Storage directory
"storageDir": "", // Storage directory
"whiteDownloadDirs": ["/root/downloads", "/root/dir/*", "/root/dir?abc"] // Download directory whitelist, when this option is configured, all tasks downloaded to non-whitelisted folders will fail, support wildcard, rules refer to https://pkg.go.dev/path/filepath#Match
}
```
Expand All @@ -119,7 +120,7 @@ If you need to set the default download configuration when the server starts for
"address": "127.0.0.1",
"port": 9999,
"downloadConfig": {
"downloadDir": "d:/test" // Set the default download directory
"downloadDir": "d:/test" // Set the default download directory
}
}
```
Expand Down
45 changes: 23 additions & 22 deletions docs/zh-TW/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ Macos 版本提供了`.dmg`文件,雙擊即可安裝,安裝套件支援`inte

- Flatpak

```sh
flatpak install flathub com.gopeed.Gopeed
```
```sh
flatpak install flathub com.gopeed.Gopeed
```

- Snap

```sh
sudo snap install gopeed
```
```sh
sudo snap install gopeed
```

除此之外,還提供了`.deb``.AppImage`兩種安裝包,可以自行選擇下載安裝。

Expand Down Expand Up @@ -58,16 +58,16 @@ Android 版本提供了`.apk`文件,可以直接下載安裝,支援所有的
1. 下載 Web 版本,解壓縮後會得到一個資料夾,將其放到你想要的位置。
2. 在資料夾根目錄中開啟終端,執行`./gopeed.exe`,如果執行成功會看到下列輸出:

```bash
```bash

_______ ______ .______ _______ _______ _______
/ _____| / __ \ | _ \ | ____|| ____|| \
| | __ | | | | | |_) | | |__ | |__ | .--. |
| | |_ | | | | | | ___/ | __| | __| | | | |
| |__| | | `--' | | | | |____ | |____ | '--' |
\______| \______/ | _| |_______||_______||_______/
_______ ______ .______ _______ _______ _______
/ _____| / __ \ | _ \ | ____|| ____|| \
| | __ | | | | | |_) | | |__ | |__ | .--. |
| | |_ | | | | | | ___/ | __| | __| | | | |
| |__| | | `--' | | | | |____ | |____ | '--' |
\______| \______/ | _| |_______||_______||_______/
Server start success on http://[::]:9999
Server start success on http://[::]:9999
```
3. 開啟瀏覽器,造訪`http://localhost:9999` 即可。
Expand Down Expand Up @@ -99,12 +99,13 @@ Usage of C:\Users\levi\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe:
```json
{
"address": "", // 綁定的IP位址(預設:0.0.0.0)
"port": 0, // 綁定的連接埠(預設:9999)
"username": "", // 服務身分認證使用者名,為空時不啟用身分認證
"password": "", // 服務認證密碼(預設:gopeed)
"apiToken": "", // HTTP API 令牌,在啟用身分認證的情況下使用 HTTP API 時,必須設定令牌
"storageDir": "" // 存储目錄
"address": "", // 綁定的IP位址(預設:0.0.0.0)
"port": 0, // 綁定的連接埠(預設:9999)
"username": "", // 服務身分認證使用者名,為空時不啟用身分認證
"password": "", // 服務認證密碼(預設:gopeed)
"apiToken": "", // HTTP API 令牌,在啟用身分認證的情況下使用 HTTP API 時,必須設定令牌
"storageDir": "", // 存储目錄
"whiteDownloadDirs": ["/root/downloads", "/root/dir/*", "/root/dir?abc"] // 下載目錄白名單,當配置了此選項時,所有下載到非白名單資料夾的任務都會失敗,支援通配符,規則參考 https://pkg.go.dev/path/filepath#Match
}
```
Expand All @@ -119,7 +120,7 @@ Usage of C:\Users\levi\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe:
"address": "127.0.0.1",
"port": 9999,
"downloadConfig": {
"downloadDir": "d:/test" // 設定預設下載目錄
"downloadDir": "d:/test" // 設定預設下載目錄
}
}
```
Expand Down Expand Up @@ -189,4 +190,4 @@ gopeed D:/Downloads/file.torrent
```sh
gopeed magnet:?xt=urn:btih:xxxx
```
```
7 changes: 4 additions & 3 deletions docs/zh/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,12 @@ Usage of C:\Users\levi\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe:
"username": "", // 服务身份认证用户名,为空时不启用身份认证
"password": "", // 服务身份认证密码(默认:gopeed)
"apiToken": "", // HTTP API 令牌,在启用身份认证的情况下使用 HTTP API 时,必须配置令牌
"storageDir": "" // 存储目录
"storageDir": "", // 存储目录
"whiteDownloadDirs": ["/root/downloads", "/root/dir/*", "/root/dir?abc"] // 下载目录白名单,当配置了此选项时,所有下载到非白名单文件夹的任务都会失败,支持通配符,规则参考 https://pkg.go.dev/path/filepath#Match
}
```
> 注:如果你是在公网 ip 上进行部署,建议启用身份认证,否则会有安全风险。
> 注:如果在公网 ip 上进行部署,建议启用身份认证,否则会有安全风险。
#### 默认下载配置
Expand All @@ -119,7 +120,7 @@ Usage of C:\Users\levi\Downloads\gopeed-web-v1.3.13-windows-amd64\gopeed.exe:
"address": "127.0.0.1",
"port": 9999,
"downloadConfig": {
"downloadDir": "d:/test" // 设置默认下载目录
"downloadDir": "d:/test" // 设置默认下载目录
}
}
```
Expand Down

0 comments on commit 7912841

Please sign in to comment.