lantongxue / rustdesk-api-server-pro

🚀This is an open source Api server based on the open source RustDesk client, the implementation of the client all Api interfaces, and provides a Web-UI for the management of data.
GNU Affero General Public License v3.0
16 stars 2 forks source link
rustdesk rustdesk-api-server

Rustdesk Api Server Pro

English | 简体中文

This is an open source Api server based on the open source RustDesk client, the implementation of the client all Api interfaces, and provides a Web-UI for the management of data.

Preview

We strive to achieve functionality with the simplest possible code and structure!

Features

Dashboard

Users

Sessions

Audit

Build from source

Required

Build

  1. Get source code
git clone https://github.com/lantongxue/rustdesk-api-server-pro.git
  1. Build the api-server
cd backend && go build
  1. Build the frontend
    cd soybean-admin && pnpm i && pnpm build

Run

api-server

Assuming the compiled binary file is called rustdesk-api-server-pro.exe.

  1. Synchronize the database table structure

    rustdesk-api-server-pro.exe sync
  2. Add your first user

    rustdesk-api-server-pro.exe user add admin yourpassword --admin

    --admin is optional, when enabled the added user is an administrator user, otherwise it is a regular user

  3. Start the server

    rustdesk-api-server-pro.exe start

    Listening on port 8080 by default

Web Management Interface

For this step you need a web server software (e.g. nginx, apache, etc.), by copying the packaged product to the web root directory.

Typically, the packaged product is in the soybean-admin/dist directory.

Reverse Proxy Configuration, you need to configure reverse proxy in nginx or other WEB servers, through the reverse proxy server can access the interface address correctly.

Here's my backend reverse proxy configuration for you to refer to:

#PROXY-START /api for rustdesk client
location ^~ /api
{
    proxy_pass http://127.0.0.1:8080;
    proxy_set_header Host 127.0.0.1;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_http_version 1.1;
    # proxy_hide_header Upgrade;

    add_header X-Cache $upstream_cache_status;
}
#PROXY-END/

#PROXY-START /admin for web-ui
location ^~ /admin
{
    proxy_pass http://127.0.0.1:8080/admin;
    proxy_set_header Host 127.0.0.1;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_http_version 1.1;
    # proxy_hide_header Upgrade;

    add_header X-Cache $upstream_cache_status;
}
#PROXY-END/

CLI help

Usage:
  rustdesk-api-server [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  rustdesk    About rustdesk-server command
  start       Start the api-server
  sync        The api-server database synchronization
  user        User management

Flags:
  -h, --help   help for rustdesk-api-server

Use "rustdesk-api-server [command] --help" for more information about a command.

Follow-up plan

We will continue to follow up the RustDesk client and implement the corresponding interfaces, which will be a long-term plan.

Short-term plan

Sponsorship

If you found this project helpful, why not buy the developers a cup of coffee :)

Sponsorship

Thank you for your sponsorship

License

You can view the full license here

This project is under the terms of the MIT license.