rustdesk / rustdesk-server

RustDesk Server Program
https://rustdesk.com/server
GNU Affero General Public License v3.0
5.96k stars 1.22k forks source link

Add TCP support with tcp encrypted stream to opensource rustdesk-server #400

Open eltorio opened 2 months ago

eltorio commented 2 months ago

Compiling Rustdesk client with TEST_TCP enables to use tcp as the transport stream. This stream is encrypted. This protocol is enabled in the pro version of rustdesk-server but not in the opensource version.

This pull request enables this protocol in the opensource version.

It also updates the hbb_common library to the latest version found in https://github.com/rustdesk/rustdesk

herokukms commented 2 months ago

Hi @eltorio , I saw your PR, could you publish binaries for linux ? Thank you

eltorio commented 2 months ago

@herokukms No problem I'll publish them but I published a docker image sctg/sctgdesk-server:latest for linux/amd64 and linux/arm64 they are based on Ubuntu 22.04. It is easy to extract the binaries from:

docker create --name tempcontainer sctg/sctgdesk-server:latest
docker cp tempcontainer:/usr/local/bin/hbbs .
docker cp tempcontainer:/usr/local/bin/hbbr .
docker cp tempcontainer:/usr/local/bin/rustdesk-utils .
herokukms commented 2 months ago

@eltorio, thank you it works well with the TEST_TCP, could you publish the client you spoke?

I modified the RustDesk client for adding an option to choose between UDP and TCP mode

Thank you

eltorio commented 2 months ago

No sorry, I cannot for 2 reasons:

But I respect the AGPLv3 license of Rustdesk and I published all the code on my fork: You can build it yourself:
All the build is made via this modified workflow It produces binaries for Macos intel, iOS, Ubuntu amd64, windows x64 and x86, everything is customized via Github secrets. At the end it uploads the builds to a private S3 bucket.
You can adapt it to your needs, The CI workflow use a special build.py for making some customizations. You may want to keep the original one if you don't need to customize the client. Finally: if you want to integrate only the TCP/UDP switch to your source look at 2ea8447c9603ca0a578eb103088ba87345e24c4e or better compare flutter/lib/desktop/pages/desktop_setting_page.dart and src/rendezvous_mediator.rs with rustdesk/rustdesk head

eltorio commented 2 months ago

@herokukms as promised I published hbbs, hbbr and rustdesk-utils in my fork . Note that:

herokukms commented 2 months ago

@eltorio thanks a lot it works

herokukms commented 2 months ago

Dear @eltorio , I updated your release and now hbbs listens on 21114 ? Did you change something ?

eltorio commented 2 months ago

Dear @herokukms,

I appreciate your interest in my work. However, I believe this might not be the best place to discuss a fork.

You're correct, my hbbs does listen on tcp/21114. This is because it includes a minimalist API server for Rustdesk. I understand that this might not be what you're looking for. The reason it's visible is due to the AGPLv3 license of the rustdesk-server. This license grants you the right to access the source code. However, if you choose to modify it, you are obligated to publish your modifications under the same license.

I am a firm believer in open source and therefore, I respect the terms of the license.

Regarding your question, you're welcome to explore the project. Please note that it lacks a user interface, support, and documentation, except for an openapi3.json and a Rapidoc frontend.

If you're in need of an API server, I would recommend considering a Rustdesk Pro license if it's within your budget.
I don't have any plan to implement a full clone of rustdesk-server-pro !