- WebSocket relay service (FastAPI) bridges agents and viewers - Python agent with screen capture (mss), input control (pynput), script execution, and auto-reconnect - Windows service wrapper, PyInstaller spec, NSIS installer for silent mass deployment (RemoteLink-Setup.exe /S /SERVER= /ENROLL=) - Enrollment token system: admin generates tokens, agents self-register - Real WebSocket viewer replaces simulated canvas - Linux agent binary served from /downloads/remotelink-agent-linux - DB migration 0002: viewer_token on sessions, enrollment_tokens table - Sign-up pages cleaned up (invite-only redirect) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
67 lines
1.8 KiB
Markdown
67 lines
1.8 KiB
Markdown
# RemoteLink Agent
|
|
|
|
Cross-platform remote support agent. Streams the screen to the RemoteLink server and handles remote mouse/keyboard input and script execution.
|
|
|
|
## Quick start
|
|
|
|
### Run-once (portable, no install)
|
|
|
|
```bash
|
|
# Linux / macOS
|
|
python agent.py --server https://remotelink.example.com --enroll YOUR_TOKEN --run-once
|
|
|
|
# Windows — run the pre-built exe
|
|
remotelink-agent.exe --server https://remotelink.example.com --enroll YOUR_TOKEN --run-once
|
|
```
|
|
|
|
### Permanent install (saves config, reconnects on reboot)
|
|
|
|
```bash
|
|
python agent.py --server https://remotelink.example.com --enroll YOUR_TOKEN
|
|
# Config saved to /etc/remotelink/agent.json (Linux) or C:\ProgramData\RemoteLink\agent.json (Windows)
|
|
# Start normally on next run:
|
|
python agent.py
|
|
```
|
|
|
|
### Windows service (runs on login / system start)
|
|
|
|
```batch
|
|
remotelink-agent-service.exe install
|
|
remotelink-agent-service.exe start
|
|
```
|
|
|
|
### Mass deployment (NSIS installer, silent)
|
|
|
|
```batch
|
|
RemoteLink-Setup.exe /S /SERVER=https://remotelink.example.com /ENROLL=YOUR_TOKEN
|
|
```
|
|
|
|
This silently installs, enrolls the machine, installs the Windows service, and starts it — no UI shown.
|
|
|
|
## Building
|
|
|
|
```bash
|
|
# Install deps + build portable binary (all platforms)
|
|
./build.sh
|
|
|
|
# Output: dist/remotelink-agent (Linux/macOS)
|
|
# dist/remotelink-agent.exe + dist/remotelink-agent-service.exe (Windows)
|
|
# RemoteLink-Setup.exe (Windows + NSIS installed)
|
|
```
|
|
|
|
## Enrollment tokens
|
|
|
|
Generate enrollment tokens in the RemoteLink web UI under **Admin → Enrollment Tokens**.
|
|
|
|
Each token can optionally have:
|
|
- An expiry date
|
|
- A max-uses limit
|
|
- A label for tracking
|
|
|
|
## Protocol
|
|
|
|
The agent connects to the relay WebSocket server:
|
|
- `ws://<relay-host>:8765/ws/agent?machine_id=<id>&access_key=<key>`
|
|
|
|
It streams JPEG frames as binary WebSocket messages and receives JSON control events.
|