Browse Source

Merge pull request #78 from paspo/pack-release

Zipped release binaries
RustDesk 3 years ago
parent
commit
9036b7b9fa
2 changed files with 51 additions and 38 deletions
  1. 18 29
      .github/workflows/build.yaml
  2. 33 9
      README.md

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

@@ -75,45 +75,34 @@ jobs:
75
     name: Github release
75
     name: Github release
76
     needs: build
76
     needs: build
77
     runs-on: ubuntu-22.04
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
     steps:
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
         uses: actions/download-artifact@v3
90
         uses: actions/download-artifact@v3
95
         with:
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
         uses: softprops/action-gh-release@v1
102
         uses: softprops/action-gh-release@v1
110
         with:
103
         with:
111
           draft: true
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
   # docker build and push of single-arch images
107
   # docker build and push of single-arch images
119
   docker:
108
   docker:

+ 33 - 9
README.md

@@ -16,10 +16,11 @@ Self-host your own RustDesk server, it is free and open source.
16
 cargo build --release
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
 - hbbs - RustDesk ID/Rendezvous server
21
 - hbbs - RustDesk ID/Rendezvous server
22
 - hbbr - RustDesk relay server
22
 - hbbr - RustDesk relay server
23
+- rustdesk-utils - RustDesk CLI utilities
23
 
24
 
24
 You can find updated binaries on the [releases](https://github.com/rustdesk/rustdesk-server/releases) page.
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
 ### Classic image
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
 | architecture | image:tag |
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
 You can start these images directly with `docker run` with these commands:
42
 You can start these images directly with `docker run` with these commands:
42
 
43
 
43
 ```bash
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
 or without --net=host, but P2P direct connection can not work.
49
 or without --net=host, but P2P direct connection can not work.
49
 
50
 
50
 ```bash
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
 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`.
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
     image: rustdesk/rustdesk-server:latest
75
     image: rustdesk/rustdesk-server:latest
75
     command: hbbs -r rustdesk.example.com:21117
76
     command: hbbs -r rustdesk.example.com:21117
76
     volumes:
77
     volumes:
77
-      - ./hbbs:/root
78
+      - ./data:/root
78
     networks:
79
     networks:
79
       - rustdesk-net
80
       - rustdesk-net
80
     depends_on:
81
     depends_on:
@@ -89,7 +90,7 @@ services:
89
     image: rustdesk/rustdesk-server:latest
90
     image: rustdesk/rustdesk-server:latest
90
     command: hbbr
91
     command: hbbr
91
     volumes:
92
     volumes:
92
-      - ./hbbr:/root
93
+      - ./data:/root
93
     networks:
94
     networks:
94
       - rustdesk-net
95
       - rustdesk-net
95
     restart: unless-stopped
96
     restart: unless-stopped
@@ -279,9 +280,32 @@ secrets:
279
     file: secrets/id_ed25519      
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
 ## .deb packages
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
 These packages are meant for the following distributions:
309
 These packages are meant for the following distributions:
286
 
310
 
287
 - Ubuntu 22.04 LTS
311
 - Ubuntu 22.04 LTS