Remote Control over HTTP (RCoH).
A Flask application to provide endpoints for viewing and controlling the remote host.
pyautogui
is used for all local operations, e.g. mouse clicks, key-presses and display monitoring.
There are four endpoints:
/
- return client web page/display
- return current frame (Base64-encoded)/keypress
- press specified key/click
- move mouse and click specified button
Using JavaScript, clicks and key-presses are sent to the relevant endpoints with the required data.
The current frame (screenshot) is downloaded every 1000/FPS
milliseconds, formatted as IMAGE_FORMAT
and Base64-encoded.
If disconnected from the server, remote control will resume after reconnecting.
RCoH is useful where the client only has a web browser available and temporary remote access is required for a host. The server will control the active session of the user who has started it.
The host must be accessible to the client, in order to connect to the web server, whether by being connected to the same LAN or by port forwarding.
However, please note that all traffic is unencrypted, meaning the display, mouse clicks and keystrokes are openly visible.
If deploying in a public setting, either a reverse proxy - such as nginx - with HTTPS should be used, or the Flask application should listen on localhost
and port forward via SSH, encrypting traffic along the way.
If other remote desktop protocols, such as RDP or VNC, are unavailable, RCoH should be sufficient for troubleshooting, but lacks various features to be suitable for a robust remote desktop environment.
- Currently, mouse movements are not sent to the server - only clicks.
- In the same way, mouse dragging will not work either.
- Keys are pressed instantaneously. Therefore, keyboard shortcuts will not work yet.
- Sound is not sent at all - and likely never will be.
After cloning the repository with: git clone https://github.com/Zedeldi/RCoH.git
- Install project:
pip install .
- Run:
rcoh-server [host] [port]
- Install dependencies:
pip install -r requirements.txt
- Run:
python -m rcoh [host] [port]
The server application can be bundled with PyInstaller, by adding the required static files and templates for Flask to the bundle.
pyinstaller --name "rcoh-server" --add-data "rcoh/static:static" --add-data "rcoh/templates:templates" rcoh/server.py
Libraries:
RCoH
is licensed under the MIT Licence for everyone to use, modify and share freely.
This project is distributed in the hope that it will be useful, but without any warranty.
Icons = https://feathericons.com/
If you found this project useful, please consider donating. Any amount is greatly appreciated! Thank you 😃