RemoteLink Agent
The RemoteLink Agent is an Electron-based desktop application that enables remote desktop control. It runs in the system tray and allows users to generate session codes for remote access.
Features
- System tray integration with quick access menu
- Session code generation (6-digit codes, 10-minute expiry)
- Screen capture using Electron's desktopCapturer
- WebRTC peer-to-peer connections
- Multi-monitor support
- Cross-platform (Windows, macOS, Linux)
Development Setup
# Navigate to the agent directory
cd electron-agent
# Install dependencies
npm install
# Run in development mode
npm run dev
Building
# Build for all platforms
npm run build
npm run package
# Platform-specific builds
npm run package:win # Windows
npm run package:mac # macOS
npm run package:linux # Linux
Architecture
electron-agent/
├── src/
│ ├── main/ # Main process (Node.js)
│ │ └── index.ts # Tray, IPC handlers, WebRTC
│ ├── preload/ # Preload scripts (bridge)
│ │ └── index.ts # Exposes safe APIs to renderer
│ └── renderer/ # Renderer process (UI)
│ └── index.html # Agent UI
├── assets/ # Icons and images
└── package.json
Configuration
The agent needs to be configured with an access key from the RemoteLink web dashboard:
- Register/login at the web dashboard
- Navigate to Machines > Add Machine
- Copy the generated access key
- Paste it in the agent's setup screen
API Endpoints
The agent communicates with these server endpoints:
POST /api/agent/register- Register machine with serverPOST /api/agent/heartbeat- Maintain online statusPOST /api/agent/session-code- Generate session codesPOST /api/signal- WebRTC signaling
Security
- Access keys are unique per machine
- Session codes expire after 10 minutes
- All WebRTC connections are encrypted
- No screen data passes through servers (P2P)
Input Simulation
For full remote control, the agent uses native libraries:
- Windows:
robotjsornut.js - macOS: Requires Accessibility permissions
- Linux: X11 or Wayland protocols
Note: Input simulation is not implemented in this demo version.