BilldDesk Pro

repository·main·Indexed 27 days ago

https://github.com/galaxy-s10/billd-desk

A cross-platform remote desktop control system for managing computers and Android devices via web browsers, desktop clients, or mobile apps. It features high-frame-rate gaming modes, hardware acceleration (H264, H265, AV1, VP8, VP9), group control, and bidirectional file transfer. Compatible with Windows 10/11, Windows Server 2019/2022, macOS 15, and Android 8-16.

Tokens
10.9K
Snippets
21
Records
63
Agent score
92%

What's inside billd-desk

  1. Build billd-desk(pro) for various platforms

    main

    Important Pre-requisite

    Building the project uses standard-version for versioning. Ensure the project is initialized with Git, otherwise the build process will fail.

    Build Commands

    Web Build

    Builds the web version. Output is located in the dist directory.

    npm run build:web

    Desktop Builds (Windows, macOS, Linux)

    Builds the Electron application packages. Output is located in the electron-release directory.

    • All Platforms: npm run build
    • Windows only: npm run build:win
    • macOS only: npm run build:mac
    • Linux only: npm run build:linux
    npm run build
  2. Download and use BilldDesk Pro

    main

    BilldDesk Pro is a cross-platform remote desktop control solution similar to ToDesk or Sunflower. You can use it to control computers and Android devices from a web browser, a desktop client, or an Android device.

    Quick Start

    Key Capabilities

    • Cross-Platform Control: Web/Desktop controlling Desktop/Android, and Android controlling Desktop/Android (Desktop/Web is view-only).
    • Advanced Features: Supports multi-screen operation, file transfer (bidirectional), clipboard synchronization, resolution synchronization, and remote Wake-on-LAN (WOL).
    • Performance Modes: Includes 'Office' mode (low frame rate to save bandwidth) and 'Gaming' mode (high frame rate priority).
    • Mouse Modes: Supports using the controller's mouse, the controlled device's mouse (for FPS games), and an 'Intelligent Mouse' mode.
    https://desk.hsslive.cn
  3. Install and configure Redis via Docker

    main

    To set up a local Redis instance, use redis:7.0. You must provide custom configuration files (redis.conf and users.acl) from the project root to your local directory before starting the container.

    1. Prepare directories: Create conf and data directories in your local Redis path.
    2. Copy config: Copy /docker/redis/conf/redis.conf and users.acl from the project root to your local conf directory.
    3. Run the container: Map the local data and configuration files into the container.
    # 1. Pull the image
    docker pull redis:7.0
    
    # 2. Start the container (Assumes local directories and config files are prepared)
    LOCAL_DOCKER_RESIS_PATH=/Users/huangshuisheng/Desktop/docker/redis \
    && docker run -d \
    -p 6379:6379 \
    --name billd-desk-redis \
    -v $LOCAL_DOCKER_RESIS_PATH/data:/data \
    -v $LOCAL_DOCKER_RESIS_PATH/conf/redis.conf:/etc/redis/redis.conf \
    -v $LOCAL_DOCKER_RESIS_PATH/conf/users.acl:/etc/redis/users.acl \
    redis:7.0 redis-server /etc/redis/redis.conf
  4. Install and configure MySQL via Docker

    main

    To set up a local MySQL instance for BilldDesk, follow these steps to pull the image, extract the default configuration, and run the container with custom settings.

    1. Pull the image: Use mysql:8.0.
    2. Extract configuration: Create a temporary container to copy the /etc/my.cnf file to your local machine. Ensure the local directory exists before running the copy command.
    3. Run the container: Start the container using a volume mapping for both the configuration file and the data directory.
    # 1. Pull the image
    docker pull mysql:8.0
    
    # 2. Copy configuration to local (Ensure $LOCAL_DOCKER_MYSQL_PATH/conf exists)
    LOCAL_DOCKER_MYSQL_PATH=/Users/huangshuisheng/Desktop/docker/mysql \
    DOCKER_MYSQL_TMP=`docker run -d mysql:8.0` \
    && docker cp $DOCKER_MYSQL_TMP:/etc/my.cnf $LOCAL_DOCKER_MYSQL_PATH/conf \
    && docker stop $DOCKER_MYSQL_TMP \
    && docker rm $DOCKER_MYSQL_TMP
    
    # 3. Start the container with custom config and data mapping
    LOCAL_DOCKER_MYSQL_PATH=/Users/huangshuisheng/Desktop/docker/mysql \
    && docker run -d \
    -p 3306:3306 \
    --name billd-desk-mysql \
    -e MYSQL_ROOT_PASSWORD=mysql123. \
    -v $LOCAL_DOCKER_MYSQL_PATH/conf/my.cnf:/etc/my.cnf \
    -v $LOCAL_DOCKER_MYSQL_PATH/data:/var/lib/mysql/ \
    mysql:8.0
  5. Join the BilldDesk User Community

    main

    To join the official BilldDesk user community via WeChat, you must follow these specific steps in order:

    1. Complete the mandatory questionnaire: https://hcnb6r23b8d2.feishu.cn/share/base/form/shrcnlM40x0sVpK2HANrlkMQT9d
    2. Add the WeChat ID: shuisheng9905
    3. Crucial: You must include the following note in your friend request: 已填问卷,加BilldDesk微信群 (meaning: "Questionnaire filled, adding to BilldDesk WeChat group")

    Warning: Users who add the contact without having completed the questionnaire will be removed from the official group and permanently blacklisted.

  6. Implement Multi-to-One Remote Control via WebRTC

    main

    To implement a multi-to-one remote control scenario (multiple controllers controlling a single client), follow this message-based workflow:

    1. Initiate Connection: The controller client must click connect and send the billdDeskStartRemote message.
    2. Handle Connection on Controlled Client: The controlled client listens for the billdDeskStartRemote message and performs the following logic:
      • If no stream exists: Call the native interface to acquire the stream.
      • If a stream exists: Call updateWebRtcRemoteDeskConfig to initiate the WebRTC handshake process (Offer/Answer).
    3. Manage Permissions: By default, all users connected to the remote session can perform operations. You may implement logic to switch between 'Control Mode' and 'Observation Mode'.
    4. Terminate Session:
      • When a controller disconnects, it must not affect other active connections.
      • The controlled client should only display the 'Remote Connection Disconnected' status once all connected users have disconnected.
  7. Perform remote end latency performance testing

    main

    To evaluate the system's response speed across different network environments and terminals, follow this testing methodology:

    1. Preparation

    • Ensure all devices (PC, Mobile, Web) are connected to the target network.
    • Record device specifications: model, operating system, and browser or client version.

    2. Testing Procedure

    • Network Latency: Use the ping command to test the basic network latency between the client and the server.
    • End-to-End Latency: Record actual response times during real application operations, such as:
      • Page loading
      • Remote desktop interaction
      • File transfers
    • Consistency: Repeat each test scenario at least 5 times and calculate the average value.

    3. Data Recording

    For every test, record the latency in milliseconds (ms) and note any anomalies such as packet loss or timeouts.

  8. Install dependencies for billd-desk(pro)

    main

    To install the project dependencies, ensure you are using the recommended Node.js and pnpm versions.

    Requirements:

    • Node.js: v18.19.0 (v18 recommended)
    • pnpm: 9.1.3 (v9 recommended)

    Run the following command to install standard dependencies:

    pnpm i

    To update specific billd related dependencies to their latest versions, use:

    pnpm i billd-deploy@latest billd-utils@latest billd-scss@latest billd-html-webpack-plugin@latest
    pnpm i
  9. Install Coturn via Docker

    main

    Coturn is used for TURN/STUN services. Note that it is not required for local development environments. If needed, pull the coturn/coturn image and run it using the host network mode with a mapped configuration file.

    # Pull and run Coturn
    docker pull coturn/coturn
    
    LOCAL_DOCKER_COTURN_PATH=/Users/huangshuisheng/Desktop/docker/coturn \
    && docker run -d --network=host  \
    --name billd-desk-coturn \
    -v $LOCAL_DOCKER_COTURN_PATH/coturn.conf:/my/coturn.conf \
    coturn/coturn -c /my/coturn.conf
  10. Configure ESLint for BilldDesk

    main

    The project uses a flat configuration file (eslint.config.js) that integrates ESLint recommended rules, TypeScript, Vue 3, Prettier, and Import plugin settings. It applies specific rulesets based on file extensions (.ts, .tsx, .vue).

    Ignored Files

    The following paths are ignored by ESLint:

    • node_modules
    • pnpm-lock.yaml
    • dist
    • components.d.ts
    • auto-imports.d.ts
    • electron-dist/**/*
    • deploy/**/*
    • .DS_Store
    • .eslintcache