How bitter-caramel/remote_control works
Remote_control is a two-program remote-assistance system: the user-side agent initiates a persistent connection to the helper, registers its identity, and bridges a persistent interactive shell; operators then view and control that terminal through the DOS panel, a local terminal window, or the browser console. The helper also supports one-shot command execution, role-based access, machine visibility levels, and persistent account/session/audit data. Edges use excerpts or README statements; some internal routing and unsampled subsystems are documented rather than shown in source excerpts.
Main entry points: app/main.go Runtime Assembly · manager.go Bot Manager · agent/main.go Agent Entry · server.go Browser Console
Components 24
User Agent
- Agent Entry
user/internal/agent/main.go - Identity Config
user/internal/core/config.go - Server Connection
user/internal/core/conn.go - Interactive Shell
user/internal/term/shell.go - One-shot Exec
user/internal/exec/agentexec.go
Helper Runtime
- Runtime Assembly
helper/internal/app/main.go - Agent Listener
helper/internal/uplink/listener.go - Bot Manager
helper/internal/core/manager.go - Bot Session
helper/internal/core/bot.go - Heartbeat Monitor
helper/internal/core/heartbeat.go
Operator Interfaces
- DOS Panel
helper/internal/panel/panel.go - Panel Bot Actions
helper/internal/panel/bot.go - Local IPC
helper/internal/ipc/server.go - Terminal Window
helper/internal/ipc/client.go - CLI Agent
helper/internal/ipc/agentcli.go - Browser Console
helper/internal/webui/server.go
Access and Records
- Authentication
helper/internal/auth/auth.go - SQLite Records
helper/internal/store/store.go - Account and Bot Admin
helper/internal/webui/admin.go
Protocol and Logs
- Wire Protocol
helper/protocol/message.go - Agent Protocol Copy
user/protocol/message.go - Operational Logs
helper/logx/logx.go
Other components
- Operator
- Managed Host
Connections 34
- Managed Host → Agent Entry: starts
- Agent Entry → Identity Config: loads identity
user/internal/agent/main.go - Agent Entry → Server Connection: dials and registers
user/internal/agent/main.go - Agent Entry → Interactive Shell: starts shell
user/internal/agent/main.go - Interactive Shell → Server Connection: streams terminal
README.md - Agent Entry → One-shot Exec: dispatches commands
README.md - Agent Entry → Agent Protocol Copy: exchanges messages
user/internal/agent/main.go - Server Connection → Agent Listener: connects to
README.md - Runtime Assembly → Agent Listener: starts listener
helper/internal/app/main.go - Runtime Assembly → Browser Console: mounts routes
helper/internal/app/main.go - Runtime Assembly → Local IPC: starts IPC
helper/internal/app/main.go - Runtime Assembly → DOS Panel: runs panel
helper/internal/app/main.go - Runtime Assembly → Bot Manager: creates manager
helper/internal/app/main.go - Runtime Assembly → SQLite Records: opens database
helper/internal/app/main.go - Runtime Assembly → Authentication: configures auth
helper/internal/app/main.go - Agent Listener → Bot Manager: registers agents
README.md - Bot Manager → Bot Session: tracks sessions
helper/internal/core/manager.go - Heartbeat Monitor → Bot Manager: marks missed beats
README.md - DOS Panel → Panel Bot Actions: dispatches actions
- Panel Bot Actions → Bot Manager: gets bot state
- DOS Panel → Local IPC: opens terminal
- Terminal Window → Local IPC: attaches locally
helper/internal/ipc/client.go - Local IPC → Bot Manager: subscribes to bot
helper/internal/ipc/server.go - CLI Agent → Local IPC: uses CLI channel
helper/internal/ipc/server.go - Browser Console → Authentication: requires sessions
helper/internal/webui/server.go - Browser Console → Bot Manager: lists and bridges bots
helper/internal/webui/server.go - Browser Console → SQLite Records: reads access levels
helper/internal/webui/server.go - Account and Bot Admin → SQLite Records: manages accounts
README.md - Authentication → SQLite Records: checks credentials
README.md - Bot Manager → Operational Logs: records connections
helper/internal/core/manager.go - Agent Protocol Copy → Wire Protocol: mirrors schema
README.md - Operator → DOS Panel: enters commands
README.md - Operator → Browser Console: uses browser
README.md - Server Connection → Interactive Shell: forwards input
README.md