Skip to content

dvinix/ZenFlow-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZenFlow Remote Control Server

A production-ready WebSocket server that enables phone-to-PC remote control functionality.

Features

  • 🖱️ Mouse Control: Move cursor, click, scroll, and drag operations
  • ⌨️ Keyboard Input: Text typing, key combinations, and special keys
  • 🔍 Auto-Discovery: Phones can automatically discover the PC on the network
  • 🌐 WebSocket Communication: Real-time, low-latency connection
  • 📱 Cross-Platform: Works with any WebSocket-capable mobile app
  • 🛡️ Production Ready: Comprehensive error handling and logging

Quick Start

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd WebServer
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the server:

    python gui/server.py

Building Executable

  1. Install PyInstaller:

    pip install pyinstaller
  2. Build executable:

    cd gui
    pyinstaller server.spec
  3. Find executable:

    dist/server.exe
    

Creating Installer

  1. Install Inno Setup (Windows)
  2. Open gui/ZenFlow-Setup.iss in Inno Setup Compiler
  3. Compile to create installer

Project Structure

WebServer/
├── core/
│   └── discovery.py          # Network service discovery
├── input/
│   ├── mouse_control.py      # Mouse control functions
│   └── keyboard_control.py   # Keyboard control functions
├── gui/
│   ├── server.py            # Main server application
│   ├── server.spec          # PyInstaller configuration
│   ├── ZenFlow-Setup.iss    # Inno Setup installer script
│   ├── dist/                # Built executable
│   └── installer/           # Generated installer
├── requirements.txt         # Python dependencies
└── .gitignore              # Git ignore rules

API Documentation

WebSocket Commands

Mouse Control

{
    "type": "mouse",
    "action": "move",
    "data": {"x": 500, "y": 300}
}

Keyboard Control

{
    "type": "keyboard",
    "action": "type",
    "data": {"text": "Hello World"}
}

Key Combinations

{
    "type": "keyboard",
    "action": "combo",
    "data": {"keys": ["ctrl", "c"]}
}

Configuration

The server automatically:

  • Detects local IP address
  • Runs on port 8080
  • Registers service as "Zenflow" for auto-discovery
  • Logs to user's AppData folder

Development

Adding New Features

  1. Mouse functions: Edit input/mouse_control.py
  2. Keyboard functions: Edit input/keyboard_control.py
  3. Network discovery: Edit core/discovery.py
  4. Main server: Edit gui/server.py

Testing

Run the server and connect using a WebSocket client or the companion mobile app.

License

[Add your license here]

Contributing

[Add contribution guidelines here]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published