diff --git a/README.md b/README.md index 5072bf3..bd1a141 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,12 @@ 本项目使用 Go 实现了 RustDesk 的 API,并包含了 Web Admin 和 Web 客户端。RustDesk 是一个远程桌面软件,提供了自托管的解决方案。 -
+
- +
@@ -156,6 +156,7 @@ app: web-client: 1 # 1:启用 0:禁用 register: false #是否开启注册 show-swagger: 0 #是否显示swagger文档 + disable-pwd-login: false #是否禁用密码登录 gin: api-addr: "0.0.0.0:21114" mode: "release" @@ -221,6 +222,7 @@ ldap: | RUSTDESK_API_APP_REGISTER | 是否开启注册; `true`, `false` 默认`false` | `false` | | RUSTDESK_API_APP_SHOW_SWAGGER | 是否可见swagger文档;`1`显示,`0`不显示,默认`0`不显示 | `1` | | RUSTDESK_API_APP_TOKEN_EXPIRE | token有效时长(秒) | `3600` | +| RUSTDESK_API_APP_DISABLE_PWD_LOGIN | 是否禁用密码登录; `true`, `false` 默认`false` | `false` | | -----ADMIN配置----- | ---------- | ---------- | | RUSTDESK_API_ADMIN_TITLE | 后台标题 | `RustDesk Api Admin` | | RUSTDESK_API_ADMIN_HELLO | 后台欢迎语,可以使用`html` | | diff --git a/README_EN.md b/README_EN.md index 9a5c6bd..3287f93 100644 --- a/README_EN.md +++ b/README_EN.md @@ -8,7 +8,7 @@ desktop software that provides self-hosted solutions. - +
@@ -155,6 +155,7 @@ app: web-client: 1 # web client route 1:open 0:close register: false #register enable show-swagger: 0 #show swagger 1:open 0:close + disable-pwd-login: false #disable password login gin: api-addr: "0.0.0.0:21114" mode: "release" @@ -212,43 +213,44 @@ ldap: The environment variables correspond one-to-one with the configurations in the `conf/config.yaml` file. The prefix for variable names is `RUSTDESK_API`. The table below does not list all configurations. Please refer to the configurations in `conf/config.yaml`. -| Variable Name | Description | Example | -|---------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------| -| TZ | timezone | Asia/Shanghai | -| RUSTDESK_API_LANG | Language | `en`,`zh-CN` | -| RUSTDESK_API_APP_WEB_CLIENT | web client on/off; 1: on, 0 off, default: 1 | 1 | -| RUSTDESK_API_APP_REGISTER | register enable; `true`, `false`; default:`false` | `false` | -| RUSTDESK_API_APP_SHOW_SWAGGER | swagger visible; 1: yes, 0: no; default: 0 | `0` | -| RUSTDESK_API_APP_TOKEN_EXPIRE | token expire duration(second) | `3600` | -| ----- ADMIN Configuration----- | ---------- | ---------- | -| RUSTDESK_API_ADMIN_TITLE | Admin Title | `RustDesk Api Admin` | -| RUSTDESK_API_ADMIN_HELLO | Admin welcome message, you can use `html` | | -| RUSTDESK_API_ADMIN_HELLO_FILE | Admin welcome message file,
will override `RUSTDESK_API_ADMIN_HELLO` | `./conf/admin/hello.html` | -| ----- GIN Configuration ----- | --------------------------------------- | ----------------------------- | -| RUSTDESK_API_GIN_TRUST_PROXY | Trusted proxy IPs, separated by commas. | 192.168.1.2,192.168.1.3 | -| ----- GORM Configuration ----- | --------------------------------------- | ----------------------------- | -| RUSTDESK_API_GORM_TYPE | Database type (`sqlite` or `mysql`). Default is `sqlite`. | sqlite | -| RUSTDESK_API_GORM_MAX_IDLE_CONNS | Maximum idle connections | 10 | -| RUSTDESK_API_GORM_MAX_OPEN_CONNS | Maximum open connections | 100 | -| RUSTDESK_API_RUSTDESK_PERSONAL | Open Personal Api 1:Enable,0:Disable | 1 | -| ----- MYSQL Configuration ----- | --------------------------------------- | ----------------------------- | -| RUSTDESK_API_MYSQL_USERNAME | MySQL username | root | -| RUSTDESK_API_MYSQL_PASSWORD | MySQL password | 111111 | -| RUSTDESK_API_MYSQL_ADDR | MySQL address | 192.168.1.66:3306 | -| RUSTDESK_API_MYSQL_DBNAME | MySQL database name | rustdesk | -| ----- RUSTDESK Configuration ----- | --------------------------------------- | ----------------------------- | -| RUSTDESK_API_RUSTDESK_ID_SERVER | Rustdesk ID server address | 192.168.1.66:21116 | -| RUSTDESK_API_RUSTDESK_RELAY_SERVER | Rustdesk relay server address | 192.168.1.66:21117 | -| RUSTDESK_API_RUSTDESK_API_SERVER | Rustdesk API server address | http://192.168.1.66:21114 | -| RUSTDESK_API_RUSTDESK_KEY | Rustdesk key | 123456789 | -| RUSTDESK_API_RUSTDESK_KEY_FILE | Rustdesk key file | `./conf/data/id_ed25519.pub` | -| RUSTDESK_API_RUSTDESK
_WEBCLIENT_MAGIC_QUERYONLINE | New online query method is enabled in the web client v2; '1': Enabled, '0': Disabled, not enabled by default | `0` | -| ---- PROXY ----- | --------------- | ---------- | -| RUSTDESK_API_PROXY_ENABLE | proxy_enable :`false`, `true` | `false` | -| RUSTDESK_API_PROXY_HOST | proxy_host | `http://127.0.0.1:1080` | -| ----JWT---- | -------- | -------- | -| RUSTDESK_API_JWT_KEY | Custom JWT KEY, if empty JWT is not enabled.
If `MUST_LOGIN` from `lejianwen/rustdesk-server` is not used, it is recommended to leave it empty. | | -| RUSTDESK_API_JWT_EXPIRE_DURATION | JWT expire duration | 360000 | +| Variable Name | Description | Example | +|--------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------| +| TZ | timezone | Asia/Shanghai | +| RUSTDESK_API_LANG | Language | `en`,`zh-CN` | +| RUSTDESK_API_APP_WEB_CLIENT | web client on/off; 1: on, 0 off, default: 1 | 1 | +| RUSTDESK_API_APP_REGISTER | register enable; `true`, `false`; default:`false` | `false` | +| RUSTDESK_API_APP_SHOW_SWAGGER | swagger visible; 1: yes, 0: no; default: 0 | `0` | +| RUSTDESK_API_APP_TOKEN_EXPIRE | token expire duration(second) | `3600` | +| RUSTDESK_API_APP_DISABLE_PWD_LOGIN | disable password login | `false` | +| ----- ADMIN Configuration----- | ---------- | ---------- | +| RUSTDESK_API_ADMIN_TITLE | Admin Title | `RustDesk Api Admin` | +| RUSTDESK_API_ADMIN_HELLO | Admin welcome message, you can use `html` | | +| RUSTDESK_API_ADMIN_HELLO_FILE | Admin welcome message file,
will override `RUSTDESK_API_ADMIN_HELLO` | `./conf/admin/hello.html` | +| ----- GIN Configuration ----- | --------------------------------------- | ----------------------------- | +| RUSTDESK_API_GIN_TRUST_PROXY | Trusted proxy IPs, separated by commas. | 192.168.1.2,192.168.1.3 | +| ----- GORM Configuration ----- | --------------------------------------- | ----------------------------- | +| RUSTDESK_API_GORM_TYPE | Database type (`sqlite` or `mysql`). Default is `sqlite`. | sqlite | +| RUSTDESK_API_GORM_MAX_IDLE_CONNS | Maximum idle connections | 10 | +| RUSTDESK_API_GORM_MAX_OPEN_CONNS | Maximum open connections | 100 | +| RUSTDESK_API_RUSTDESK_PERSONAL | Open Personal Api 1:Enable,0:Disable | 1 | +| ----- MYSQL Configuration ----- | --------------------------------------- | ----------------------------- | +| RUSTDESK_API_MYSQL_USERNAME | MySQL username | root | +| RUSTDESK_API_MYSQL_PASSWORD | MySQL password | 111111 | +| RUSTDESK_API_MYSQL_ADDR | MySQL address | 192.168.1.66:3306 | +| RUSTDESK_API_MYSQL_DBNAME | MySQL database name | rustdesk | +| ----- RUSTDESK Configuration ----- | --------------------------------------- | ----------------------------- | +| RUSTDESK_API_RUSTDESK_ID_SERVER | Rustdesk ID server address | 192.168.1.66:21116 | +| RUSTDESK_API_RUSTDESK_RELAY_SERVER | Rustdesk relay server address | 192.168.1.66:21117 | +| RUSTDESK_API_RUSTDESK_API_SERVER | Rustdesk API server address | http://192.168.1.66:21114 | +| RUSTDESK_API_RUSTDESK_KEY | Rustdesk key | 123456789 | +| RUSTDESK_API_RUSTDESK_KEY_FILE | Rustdesk key file | `./conf/data/id_ed25519.pub` | +| RUSTDESK_API_RUSTDESK
_WEBCLIENT_MAGIC_QUERYONLINE | New online query method is enabled in the web client v2; '1': Enabled, '0': Disabled, not enabled by default | `0` | +| ---- PROXY ----- | --------------- | ---------- | +| RUSTDESK_API_PROXY_ENABLE | proxy_enable :`false`, `true` | `false` | +| RUSTDESK_API_PROXY_HOST | proxy_host | `http://127.0.0.1:1080` | +| ----JWT---- | -------- | -------- | +| RUSTDESK_API_JWT_KEY | Custom JWT KEY, if empty JWT is not enabled.
If `MUST_LOGIN` from `lejianwen/rustdesk-server` is not used, it is recommended to leave it empty. | | +| RUSTDESK_API_JWT_EXPIRE_DURATION | JWT expire duration | 360000 | ### Installation Steps