|
|
@@ -8,6 +8,7 @@ desktop software that provides self-hosted solutions.
|
|
8
|
8
|
<img src="https://img.shields.io/badge/gin-v1.9.0-lightBlue"/>
|
|
9
|
9
|
<img src="https://img.shields.io/badge/gorm-v1.25.7-green"/>
|
|
10
|
10
|
<img src="https://img.shields.io/badge/swag-v1.16.3-yellow"/>
|
|
|
11
|
+<img src="https://img.shields.io/badge/i18n-7-green"/>
|
|
11
|
12
|
<img src="https://github.com/lejianwen/rustdesk-api/actions/workflows/build.yml/badge.svg"/>
|
|
12
|
13
|
</div>
|
|
13
|
14
|
|
|
|
@@ -180,48 +181,70 @@ proxy:
|
|
180
|
181
|
jwt:
|
|
181
|
182
|
key: ""
|
|
182
|
183
|
expire-duration: 360000
|
|
|
184
|
+ldap:
|
|
|
185
|
+ enable: false
|
|
|
186
|
+ url: "ldap://ldap.example.com:389"
|
|
|
187
|
+ tls: false
|
|
|
188
|
+ tls-verify: false
|
|
|
189
|
+ base-dn: "dc=example,dc=com"
|
|
|
190
|
+ bind-dn: "cn=admin,dc=example,dc=com"
|
|
|
191
|
+ bind-password: "password"
|
|
|
192
|
+
|
|
|
193
|
+ user:
|
|
|
194
|
+ base-dn: "ou=users,dc=example,dc=com"
|
|
|
195
|
+ enable-attr: "" #The attribute name of the user for enabling, in AD it is "userAccountControl", empty means no enable attribute, all users are enabled
|
|
|
196
|
+ enable-attr-value: "" # The value of the enable attribute when the user is enabled. If you are using AD, just set random value, it will be ignored.
|
|
|
197
|
+ filter: "(cn=*)"
|
|
|
198
|
+ username: "uid" # The attribute name of the user for usernamem if you are using AD, it should be "sAMAccountName"
|
|
|
199
|
+ email: "mail"
|
|
|
200
|
+ first-name: "givenName"
|
|
|
201
|
+ last-name: "sn"
|
|
|
202
|
+ sync: false # If true, the user will be synchronized to the database when the user logs in. If false, the user will be synchronized to the database when the user be created.
|
|
|
203
|
+ admin-group: "cn=admin,dc=example,dc=com" # The group name of the admin group, if the user is in this group, the user will be an admin.
|
|
|
204
|
+
|
|
183
|
205
|
```
|
|
184
|
206
|
|
|
185
|
207
|
### Environment Variables
|
|
186
|
|
-The prefix for variable names is `RUSTDESK_API`. If environment variables exist, they will override the configurations in the configuration file.
|
|
187
|
|
-
|
|
188
|
|
-| Variable Name | Description | Example |
|
|
189
|
|
-|---------------------------------------------------|--------------------------------------------------------------------------------------------------------------|-------------------------------|
|
|
190
|
|
-| TZ | timezone | Asia/Shanghai |
|
|
191
|
|
-| RUSTDESK_API_LANG | Language | `en`,`zh-CN` |
|
|
192
|
|
-| RUSTDESK_API_APP_WEB_CLIENT | web client on/off; 1: on, 0 off, default: 1 | 1 |
|
|
193
|
|
-| RUSTDESK_API_APP_REGISTER | register enable; `true`, `false`; default:`false` | `false` |
|
|
194
|
|
-| RUSTDESK_API_APP_SHOW_SWAGGER | swagger visible; 1: yes, 0: no; default: 0 | `0` |
|
|
195
|
|
-| RUSTDESK_API_APP_TOKEN_EXPIRE | token expire duration(second) | `3600` |
|
|
196
|
|
-| ----- ADMIN Configuration----- | ---------- | ---------- |
|
|
197
|
|
-| RUSTDESK_API_ADMIN_TITLE | Admin Title | `RustDesk Api Admin` |
|
|
198
|
|
-| RUSTDESK_API_ADMIN_HELLO | Admin welcome message, you can use `html` | |
|
|
199
|
|
-| RUSTDESK_API_ADMIN_HELLO_FILE | Admin welcome message file,<br>will override `RUSTDESK_API_ADMIN_HELLO` | `./conf/admin/hello.html` |
|
|
200
|
|
-| ----- GIN Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
201
|
|
-| RUSTDESK_API_GIN_TRUST_PROXY | Trusted proxy IPs, separated by commas. | 192.168.1.2,192.168.1.3 |
|
|
202
|
|
-| ----- GORM Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
203
|
|
-| RUSTDESK_API_GORM_TYPE | Database type (`sqlite` or `mysql`). Default is `sqlite`. | sqlite |
|
|
204
|
|
-| RUSTDESK_API_GORM_MAX_IDLE_CONNS | Maximum idle connections | 10 |
|
|
205
|
|
-| RUSTDESK_API_GORM_MAX_OPEN_CONNS | Maximum open connections | 100 |
|
|
206
|
|
-| RUSTDESK_API_RUSTDESK_PERSONAL | Open Personal Api 1:Enable,0:Disable | 1 |
|
|
207
|
|
-| ----- MYSQL Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
208
|
|
-| RUSTDESK_API_MYSQL_USERNAME | MySQL username | root |
|
|
209
|
|
-| RUSTDESK_API_MYSQL_PASSWORD | MySQL password | 111111 |
|
|
210
|
|
-| RUSTDESK_API_MYSQL_ADDR | MySQL address | 192.168.1.66:3306 |
|
|
211
|
|
-| RUSTDESK_API_MYSQL_DBNAME | MySQL database name | rustdesk |
|
|
212
|
|
-| ----- RUSTDESK Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
213
|
|
-| RUSTDESK_API_RUSTDESK_ID_SERVER | Rustdesk ID server address | 192.168.1.66:21116 |
|
|
214
|
|
-| RUSTDESK_API_RUSTDESK_RELAY_SERVER | Rustdesk relay server address | 192.168.1.66:21117 |
|
|
215
|
|
-| RUSTDESK_API_RUSTDESK_API_SERVER | Rustdesk API server address | http://192.168.1.66:21114 |
|
|
216
|
|
-| RUSTDESK_API_RUSTDESK_KEY | Rustdesk key | 123456789 |
|
|
217
|
|
-| RUSTDESK_API_RUSTDESK_KEY_FILE | Rustdesk key file | `./conf/data/id_ed25519.pub` |
|
|
218
|
|
-| 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` |
|
|
219
|
|
-| ---- PROXY ----- | --------------- | ---------- |
|
|
220
|
|
-| RUSTDESK_API_PROXY_ENABLE | proxy_enable :`false`, `true` | `false` |
|
|
221
|
|
-| RUSTDESK_API_PROXY_HOST | proxy_host | `http://127.0.0.1:1080` |
|
|
222
|
|
-| ----JWT---- | -------- | -------- |
|
|
223
|
|
-| RUSTDESK_API_JWT_KEY | JWT KEY. Set empty to disable jwt | |
|
|
224
|
|
-| RUSTDESK_API_JWT_EXPIRE_DURATION | JWT expire duration | 360000 |
|
|
|
208
|
+The environment variables correspond one-to-one with the configurations in the `conf/config.yaml` file. The prefix for variable names is `RUSTDESK_API`.
|
|
|
209
|
+The table below does not list all configurations. Please refer to the configurations in `conf/config.yaml`.
|
|
|
210
|
+
|
|
|
211
|
+| Variable Name | Description | Example |
|
|
|
212
|
+|---------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------|
|
|
|
213
|
+| TZ | timezone | Asia/Shanghai |
|
|
|
214
|
+| RUSTDESK_API_LANG | Language | `en`,`zh-CN` |
|
|
|
215
|
+| RUSTDESK_API_APP_WEB_CLIENT | web client on/off; 1: on, 0 off, default: 1 | 1 |
|
|
|
216
|
+| RUSTDESK_API_APP_REGISTER | register enable; `true`, `false`; default:`false` | `false` |
|
|
|
217
|
+| RUSTDESK_API_APP_SHOW_SWAGGER | swagger visible; 1: yes, 0: no; default: 0 | `0` |
|
|
|
218
|
+| RUSTDESK_API_APP_TOKEN_EXPIRE | token expire duration(second) | `3600` |
|
|
|
219
|
+| ----- ADMIN Configuration----- | ---------- | ---------- |
|
|
|
220
|
+| RUSTDESK_API_ADMIN_TITLE | Admin Title | `RustDesk Api Admin` |
|
|
|
221
|
+| RUSTDESK_API_ADMIN_HELLO | Admin welcome message, you can use `html` | |
|
|
|
222
|
+| RUSTDESK_API_ADMIN_HELLO_FILE | Admin welcome message file,<br>will override `RUSTDESK_API_ADMIN_HELLO` | `./conf/admin/hello.html` |
|
|
|
223
|
+| ----- GIN Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
|
224
|
+| RUSTDESK_API_GIN_TRUST_PROXY | Trusted proxy IPs, separated by commas. | 192.168.1.2,192.168.1.3 |
|
|
|
225
|
+| ----- GORM Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
|
226
|
+| RUSTDESK_API_GORM_TYPE | Database type (`sqlite` or `mysql`). Default is `sqlite`. | sqlite |
|
|
|
227
|
+| RUSTDESK_API_GORM_MAX_IDLE_CONNS | Maximum idle connections | 10 |
|
|
|
228
|
+| RUSTDESK_API_GORM_MAX_OPEN_CONNS | Maximum open connections | 100 |
|
|
|
229
|
+| RUSTDESK_API_RUSTDESK_PERSONAL | Open Personal Api 1:Enable,0:Disable | 1 |
|
|
|
230
|
+| ----- MYSQL Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
|
231
|
+| RUSTDESK_API_MYSQL_USERNAME | MySQL username | root |
|
|
|
232
|
+| RUSTDESK_API_MYSQL_PASSWORD | MySQL password | 111111 |
|
|
|
233
|
+| RUSTDESK_API_MYSQL_ADDR | MySQL address | 192.168.1.66:3306 |
|
|
|
234
|
+| RUSTDESK_API_MYSQL_DBNAME | MySQL database name | rustdesk |
|
|
|
235
|
+| ----- RUSTDESK Configuration ----- | --------------------------------------- | ----------------------------- |
|
|
|
236
|
+| RUSTDESK_API_RUSTDESK_ID_SERVER | Rustdesk ID server address | 192.168.1.66:21116 |
|
|
|
237
|
+| RUSTDESK_API_RUSTDESK_RELAY_SERVER | Rustdesk relay server address | 192.168.1.66:21117 |
|
|
|
238
|
+| RUSTDESK_API_RUSTDESK_API_SERVER | Rustdesk API server address | http://192.168.1.66:21114 |
|
|
|
239
|
+| RUSTDESK_API_RUSTDESK_KEY | Rustdesk key | 123456789 |
|
|
|
240
|
+| RUSTDESK_API_RUSTDESK_KEY_FILE | Rustdesk key file | `./conf/data/id_ed25519.pub` |
|
|
|
241
|
+| 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` |
|
|
|
242
|
+| ---- PROXY ----- | --------------- | ---------- |
|
|
|
243
|
+| RUSTDESK_API_PROXY_ENABLE | proxy_enable :`false`, `true` | `false` |
|
|
|
244
|
+| RUSTDESK_API_PROXY_HOST | proxy_host | `http://127.0.0.1:1080` |
|
|
|
245
|
+| ----JWT---- | -------- | -------- |
|
|
|
246
|
+| RUSTDESK_API_JWT_KEY | Custom JWT KEY, if empty JWT is not enabled.<br/>If `MUST_LOGIN` from `lejianwen/rustdesk-server` is not used, it is recommended to leave it empty. | |
|
|
|
247
|
+| RUSTDESK_API_JWT_EXPIRE_DURATION | JWT expire duration | 360000 |
|
|
225
|
248
|
|
|
226
|
249
|
### Installation Steps
|
|
227
|
250
|
|
|
|
@@ -292,8 +315,9 @@ Download the release from [release](https://github.com/lejianwen/rustdesk-api/re
|
|
292
|
315
|
|
|
293
|
316
|
#### Running with my forked server-s6 image
|
|
294
|
317
|
|
|
|
318
|
+- Connection timeout issue resolved
|
|
|
319
|
+- Can enforce login before initiating a connection
|
|
295
|
320
|
- github https://github.com/lejianwen/rustdesk-server
|
|
296
|
|
-- docker hub https://hub.docker.com/r/lejianwen/rustdesk-server-s6
|
|
297
|
321
|
|
|
298
|
322
|
```yaml
|
|
299
|
323
|
networks:
|
|
|
@@ -342,3 +366,5 @@ Thanks to everyone who contributed!
|
|
342
|
366
|
<a href="https://github.com/lejianwen/rustdesk-api/graphs/contributors">
|
|
343
|
367
|
<img src="https://contrib.rocks/image?repo=lejianwen/rustdesk-api" />
|
|
344
|
368
|
</a>
|
|
|
369
|
+
|
|
|
370
|
+## If you find this project helpful, please give it a star, thank you!
|