|
|
@@ -347,25 +347,7 @@ proxy:
|
|
347
|
347
|
```
|
|
348
|
348
|
|
|
349
|
349
|
- S6的镜像
|
|
350
|
|
- - 如果使用***自定义KEY***,会需要修改启动脚本,覆盖镜像中的`/etc/s6-overlay/s6-rc.d/hbbr/run`和`/etc/s6-overlay/s6-rc.d/hbbr/run`
|
|
351
|
|
- 1. 创建`hbbr/run`,自定义KEY才需要
|
|
352
|
|
- ```bash
|
|
353
|
|
- #!/command/with-contenv sh
|
|
354
|
|
- cd /data
|
|
355
|
|
- PARAMS=
|
|
356
|
|
- [ "${ENCRYPTED_ONLY}" = "1" ] && PARAMS="-k ${KEY}"
|
|
357
|
|
- /usr/bin/hbbr $PARAMS
|
|
358
|
|
- ```
|
|
359
|
|
- 2. 创建`hbbs/run`,自定义KEY才需要
|
|
360
|
|
- ```bash
|
|
361
|
|
- #!/command/with-contenv sh
|
|
362
|
|
- sleep 2
|
|
363
|
|
- cd /data
|
|
364
|
|
- PARAMS=
|
|
365
|
|
- [ "${ENCRYPTED_ONLY}" = "1" ] && PARAMS="-k ${KEY}"
|
|
366
|
|
- /usr/bin/hbbs -r $RELAY $PARAMS
|
|
367
|
|
- ```
|
|
368
|
|
- 3. 修改`docker-compose.yml`中的`s6`部分
|
|
|
350
|
+ - 如果使用***系统生成的KEY***或者***自定义KEY_PUB,KEY_PRIV***,不需要修改启动脚本,但要在生成KEY后获取到KEY再`docker-compose up -d`
|
|
369
|
351
|
```yaml
|
|
370
|
352
|
networks:
|
|
371
|
353
|
rustdesk-net:
|
|
|
@@ -384,11 +366,8 @@ proxy:
|
|
384
|
366
|
environment:
|
|
385
|
367
|
- RELAY=192.168.1.66:21117
|
|
386
|
368
|
- ENCRYPTED_ONLY=1
|
|
387
|
|
- - KEY=<key> #自定义KEY
|
|
388
|
369
|
volumes:
|
|
389
|
370
|
- ./data:/data
|
|
390
|
|
- - ./hbbr/run:/etc/s6-overlay/s6-rc.d/hbbr/run
|
|
391
|
|
- - ./hbbs/run:/etc/s6-overlay/s6-rc.d/hbbs/run
|
|
392
|
371
|
restart: unless-stopped
|
|
393
|
372
|
rustdesk-api:
|
|
394
|
373
|
container_name: rustdesk-api
|
|
|
@@ -400,14 +379,32 @@ proxy:
|
|
400
|
379
|
- RUSTDESK_API_RUSTDESK_ID_SERVER=192.168.1.66:21116
|
|
401
|
380
|
- RUSTDESK_API_RUSTDESK_RELAY_SERVER=192.168.1.66:21117
|
|
402
|
381
|
- RUSTDESK_API_RUSTDESK_API_SERVER=http://192.168.1.66:21114
|
|
403
|
|
- - RUSTDESK_API_RUSTDESK_KEY=<key>
|
|
|
382
|
+ - RUSTDESK_API_RUSTDESK_KEY=<key> #系统生成的KEY
|
|
404
|
383
|
volumes:
|
|
405
|
384
|
- /data/rustdesk/api:/app/data #将数据库挂载
|
|
406
|
385
|
networks:
|
|
407
|
386
|
- rustdesk-net
|
|
408
|
387
|
restart: unless-stopped
|
|
409
|
388
|
```
|
|
410
|
|
- - 如果使用***系统生成的KEY***或者***自定义KEY_PUB,KEY_PRIV***,不需要修改启动脚本,但要在生成KEY后获取到KEY再`docker-compose up -d`
|
|
|
389
|
+ - 如果使用***自定义KEY***,会需要修改启动脚本,覆盖镜像中的`/etc/s6-overlay/s6-rc.d/hbbr/run`和`/etc/s6-overlay/s6-rc.d/hbbr/run`
|
|
|
390
|
+ 1. 创建`hbbr/run`,自定义KEY才需要
|
|
|
391
|
+ ```bash
|
|
|
392
|
+ #!/command/with-contenv sh
|
|
|
393
|
+ cd /data
|
|
|
394
|
+ PARAMS=
|
|
|
395
|
+ [ "${ENCRYPTED_ONLY}" = "1" ] && PARAMS="-k ${KEY}"
|
|
|
396
|
+ /usr/bin/hbbr $PARAMS
|
|
|
397
|
+ ```
|
|
|
398
|
+ 2. 创建`hbbs/run`,自定义KEY才需要
|
|
|
399
|
+ ```bash
|
|
|
400
|
+ #!/command/with-contenv sh
|
|
|
401
|
+ sleep 2
|
|
|
402
|
+ cd /data
|
|
|
403
|
+ PARAMS=
|
|
|
404
|
+ [ "${ENCRYPTED_ONLY}" = "1" ] && PARAMS="-k ${KEY}"
|
|
|
405
|
+ /usr/bin/hbbs -r $RELAY $PARAMS
|
|
|
406
|
+ ```
|
|
|
407
|
+ 3. 修改`docker-compose.yml`中的`s6`部分
|
|
411
|
408
|
```yaml
|
|
412
|
409
|
networks:
|
|
413
|
410
|
rustdesk-net:
|
|
|
@@ -426,8 +423,11 @@ proxy:
|
|
426
|
423
|
environment:
|
|
427
|
424
|
- RELAY=192.168.1.66:21117
|
|
428
|
425
|
- ENCRYPTED_ONLY=1
|
|
|
426
|
+ - KEY=<key> #自定义KEY
|
|
429
|
427
|
volumes:
|
|
430
|
428
|
- ./data:/data
|
|
|
429
|
+ - ./hbbr/run:/etc/s6-overlay/s6-rc.d/hbbr/run
|
|
|
430
|
+ - ./hbbs/run:/etc/s6-overlay/s6-rc.d/hbbs/run
|
|
431
|
431
|
restart: unless-stopped
|
|
432
|
432
|
rustdesk-api:
|
|
433
|
433
|
container_name: rustdesk-api
|
|
|
@@ -439,13 +439,34 @@ proxy:
|
|
439
|
439
|
- RUSTDESK_API_RUSTDESK_ID_SERVER=192.168.1.66:21116
|
|
440
|
440
|
- RUSTDESK_API_RUSTDESK_RELAY_SERVER=192.168.1.66:21117
|
|
441
|
441
|
- RUSTDESK_API_RUSTDESK_API_SERVER=http://192.168.1.66:21114
|
|
442
|
|
- - RUSTDESK_API_RUSTDESK_KEY=<key> #系统生成的KEY
|
|
|
442
|
+ - RUSTDESK_API_RUSTDESK_KEY=<key>
|
|
443
|
443
|
volumes:
|
|
444
|
444
|
- /data/rustdesk/api:/app/data #将数据库挂载
|
|
445
|
445
|
networks:
|
|
446
|
446
|
- rustdesk-net
|
|
447
|
447
|
restart: unless-stopped
|
|
448
|
448
|
```
|
|
|
449
|
+
|
|
|
450
|
+#### nginx反代
|
|
|
451
|
+
|
|
|
452
|
+在`nginx`中配置反代
|
|
|
453
|
+
|
|
|
454
|
+```
|
|
|
455
|
+server {
|
|
|
456
|
+ listen <your port>;
|
|
|
457
|
+ server_name <your server>;
|
|
|
458
|
+ location / {
|
|
|
459
|
+ proxy_pass http://<api-server[:port]>;
|
|
|
460
|
+ proxy_set_header Host $host;
|
|
|
461
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
462
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
463
|
+ proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
464
|
+ }
|
|
|
465
|
+}
|
|
|
466
|
+```
|
|
|
467
|
+##### HTTPS等更多相关配置参考[wiki](https://github.com/lejianwen/rustdesk-api/wiki/Web-Client-V2-Preview-Document)
|
|
|
468
|
+
|
|
|
469
|
+
|
|
449
|
470
|
#### 下载release直接运行
|
|
450
|
471
|
|
|
451
|
472
|
[下载地址](https://github.com/lejianwen/rustdesk-api/releases)
|
|
|
@@ -488,21 +509,7 @@ proxy:
|
|
488
|
509
|
|
|
489
|
510
|
6. 打开浏览器访问`http://<your server[:port]>/_admin/`,默认用户名密码为`admin`,请及时更改密码。
|
|
490
|
511
|
|
|
491
|
|
-#### nginx反代
|
|
492
|
|
-在`nginx`中配置反代
|
|
493
|
|
-```
|
|
494
|
|
-server {
|
|
495
|
|
- listen <your port>;
|
|
496
|
|
- server_name <your server>;
|
|
497
|
|
- location / {
|
|
498
|
|
- proxy_pass http://<api-server[:port]>;
|
|
499
|
|
- proxy_set_header Host $host;
|
|
500
|
|
- proxy_set_header X-Real-IP $remote_addr;
|
|
501
|
|
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
502
|
|
- proxy_set_header X-Forwarded-Proto $scheme;
|
|
503
|
|
- }
|
|
504
|
|
-}
|
|
505
|
|
-```
|
|
|
512
|
+
|
|
506
|
513
|
## 其他
|
|
507
|
514
|
|
|
508
|
515
|
- [修改客户端ID](https://github.com/abdullah-erturk/RustDesk-ID-Changer)
|