Просмотр исходного кода

Merge pull request #78 from paspo/pack-release

Zipped release binaries
RustDesk лет назад: 3
Родитель
Сommit
9036b7b9fa
2 измененных файлов с 51 добавлено и 38 удалено
  1. 18 29
      .github/workflows/build.yaml
  2. 33 9
      README.md

+ 18 - 29
.github/workflows/build.yaml

@@ -75,45 +75,34 @@ jobs:
75 75
     name: Github release
76 76
     needs: build
77 77
     runs-on: ubuntu-22.04
78
+    strategy:
79
+      fail-fast: false
80
+      matrix:
81
+        job:
82
+          - { name: "amd64" }
83
+          - { name: "arm64v8" }
84
+          - { name: "armv7" }
85
+          - { name: "i386" }
78 86
 
79 87
     steps:
80 88
 
81
-      - name: Download binaries (amd64)
82
-        uses: actions/download-artifact@v3
83
-        with:
84
-          name: binaries-amd64
85
-          path: amd64
86
-
87
-      - name: Download binaries (arm64v8)
88
-        uses: actions/download-artifact@v3
89
-        with:
90
-          name: binaries-arm64v8
91
-          path: arm64v8
92
-
93
-      - name: Download binaries (armv7)
89
+      - name: Download binaries (${{ matrix.job.name }})
94 90
         uses: actions/download-artifact@v3
95 91
         with:
96
-          name: binaries-armv7
97
-          path: armv7
98
-
99
-      - name: Download binaries (i386)
100
-        uses: actions/download-artifact@v3
101
-        with:
102
-          name: binaries-i386
103
-          path: i386
92
+          name: binaries-${{ matrix.job.name }}
93
+          path: ${{ matrix.job.name }}
104 94
 
105
-      - name: Rename files
106
-        run: for arch in amd64 arm64v8 armv7 i386 ; do for b in hbbr hbbs rustdesk-utils ; do mv -v ${arch}/${b} ${arch}/${b}-${arch} ; done ; done 
95
+      - name: Pack files (${{ matrix.job.name }})
96
+        run: |
97
+          sudo apt update
98
+          DEBIAN_FRONTEND=noninteractive sudo apt install -y zip
99
+          zip ${{ matrix.job.name }}/rustdesk-server-linux-${{ matrix.job.name }}.zip ${{ matrix.job.name }}/hbbr ${{ matrix.job.name }}/hbbs ${{ matrix.job.name }}/rustdesk-utils
107 100
 
108
-      - name: Create Release
101
+      - name: Create Release (${{ matrix.job.name }})
109 102
         uses: softprops/action-gh-release@v1
110 103
         with:
111 104
           draft: true
112
-          files: |
113
-            amd64/*
114
-            arm64v8/*
115
-            armv7/*
116
-            i386/*
105
+          files: ${{ matrix.job.name }}/rustdesk-server-linux-${{ matrix.job.name }}.zip
117 106
             
118 107
   # docker build and push of single-arch images
119 108
   docker:

+ 33 - 9
README.md

@@ -16,10 +16,11 @@ Self-host your own RustDesk server, it is free and open source.
16 16
 cargo build --release
17 17
 ```
18 18
 
19
-Two executables will be generated in target/release.
19
+Three executables will be generated in target/release.
20 20
 
21 21
 - hbbs - RustDesk ID/Rendezvous server
22 22
 - hbbr - RustDesk relay server
23
+- rustdesk-utils - RustDesk CLI utilities
23 24
 
24 25
 You can find updated binaries on the [releases](https://github.com/rustdesk/rustdesk-server/releases) page.
25 26
 
@@ -31,7 +32,7 @@ Docker images are automatically generated and published on every github release.
31 32
 
32 33
 ### Classic image
33 34
 
34
-These images are build against `ubuntu-20.04` with the only addition of the binaries (both hbbr and hbbs). They're available on [Docker hub](https://hub.docker.com/r/rustdesk/rustdesk-server/) with these tags:
35
+These images are build against `ubuntu-20.04` with the only addition of the main binaries (`hbbr` and `hbbs`). They're available on [Docker hub](https://hub.docker.com/r/rustdesk/rustdesk-server/) with these tags:
35 36
 
36 37
 | architecture | image:tag |
37 38
 | --- | --- |
@@ -41,15 +42,15 @@ These images are build against `ubuntu-20.04` with the only addition of the bina
41 42
 You can start these images directly with `docker run` with these commands:
42 43
 
43 44
 ```bash
44
-docker run --name hbbs --net=host -v "$PWD:/root" -d rustdesk/rustdesk-server:latest hbbs -r <relay-server-ip[:port]> 
45
-docker run --name hbbr --net=host -v "$PWD:/root" -d rustdesk/rustdesk-server:latest hbbr 
45
+docker run --name hbbs --net=host -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbs -r <relay-server-ip[:port]> 
46
+docker run --name hbbr --net=host -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbr 
46 47
 ```
47 48
 
48 49
 or without --net=host, but P2P direct connection can not work.
49 50
 
50 51
 ```bash
51
-docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v "$PWD:/root" -d rustdesk/rustdesk-server:latest hbbs -r <relay-server-ip[:port]> 
52
-docker run --name hbbr -p 21117:21117 -p 21119:21119 -v "$PWD:/root" -d rustdesk/rustdesk-server:latest hbbr 
52
+docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbs -r <relay-server-ip[:port]> 
53
+docker run --name hbbr -p 21117:21117 -p 21119:21119 -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbr 
53 54
 ```
54 55
 
55 56
 The `relay-server-ip` parameter is the IP address (or dns name) of the server running these containers. The **optional** `port` parameter has to be used if you use a port different than **21117** for `hbbr`.
@@ -74,7 +75,7 @@ services:
74 75
     image: rustdesk/rustdesk-server:latest
75 76
     command: hbbs -r rustdesk.example.com:21117
76 77
     volumes:
77
-      - ./hbbs:/root
78
+      - ./data:/root
78 79
     networks:
79 80
       - rustdesk-net
80 81
     depends_on:
@@ -89,7 +90,7 @@ services:
89 90
     image: rustdesk/rustdesk-server:latest
90 91
     command: hbbr
91 92
     volumes:
92
-      - ./hbbr:/root
93
+      - ./data:/root
93 94
     networks:
94 95
       - rustdesk-net
95 96
     restart: unless-stopped
@@ -279,9 +280,32 @@ secrets:
279 280
     file: secrets/id_ed25519      
280 281
 ```
281 282
 
283
+## How to create a keypair
284
+
285
+A keypair is needed for encryption; you can provide it, as explained before, but you need a way to create one.
286
+
287
+You can use this command to generate a keypair:
288
+
289
+```bash
290
+/usr/bin/rustdesk-utils genkeypair
291
+```
292
+
293
+If you don't have (or don't want) the `rustdesk-utils` package installed on your system, you can invoke the same command with docker:
294
+
295
+```bash
296
+docker run --rm --entrypoint /usr/bin/rustdesk-utils  rustdesk/rustdesk-server-s6:latest genkeypair
297
+```
298
+
299
+The output will be something like this:
300
+
301
+```text
302
+Public Key:  8BLLhtzUBU/XKAH4mep3p+IX4DSApe7qbAwNH9nv4yA=
303
+Secret Key:  egAVd44u33ZEUIDTtksGcHeVeAwywarEdHmf99KM5ajwEsuG3NQFT9coAfiZ6nen4hfgNICl7upsDA0f2e/jIA==
304
+```
305
+
282 306
 ## .deb packages
283 307
 
284
-.deb packages are available for each binary, you can find them in the [releases](https://github.com/rustdesk/rustdesk-server/releases).
308
+Separate .deb packages are available for each binary, you can find them in the [releases](https://github.com/rustdesk/rustdesk-server/releases).
285 309
 These packages are meant for the following distributions:
286 310
 
287 311
 - Ubuntu 22.04 LTS