Add Python agent, WebSocket relay, real viewer, enrollment tokens

- 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>
This commit is contained in:
monoadmin
2026-04-10 16:25:10 -07:00
parent b2be19ed14
commit e16a2fa978
28 changed files with 1953 additions and 343 deletions

34
agent/build.sh Normal file
View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Build script for RemoteLink Agent
# Run on the target platform (Windows/macOS/Linux)
#
# Requirements: Python 3.11+, pip, pyinstaller, (Windows) NSIS
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR"
echo "==> Installing dependencies…"
pip install -r requirements.txt
pip install pyinstaller
echo "==> Building with PyInstaller…"
pyinstaller agent.spec --clean --noconfirm
echo "==> Portable binary: dist/remotelink-agent"
ls -lh dist/remotelink-agent* 2>/dev/null || ls -lh dist/
# Windows: build NSIS installer
if [[ "$OSTYPE" == "msys"* ]] || [[ "$OS" == "Windows_NT" ]]; then
if command -v makensis &>/dev/null; then
echo "==> Building NSIS installer…"
makensis installer.nsi
echo "==> Installer: RemoteLink-Setup.exe"
else
echo "==> NSIS not found — skipping installer build."
echo " Download NSIS from https://nsis.sourceforge.io"
fi
fi
echo "==> Done."