Add Remote Proxy & Network Devices (in-browser HTTP/HTTPS/SSH/Telnet access to LAN devices via an agent)#2485
Conversation
Summary of what this PR delivers (backend)This adds Remote Proxy (reach a device's web UI / terminal / VNC on an agent's LAN through the agent, no inbound ports or local client) and Network Devices, plus the infra to run it. Everything tunnels over MeshCentral's existing relay ( Remote Web Proxy (
|
…access to LAN devices via an agent) Rebased onto master (v1.5.1), conflict-free. Features: - Network Devices app (netdevices): manage non-agent LAN devices per client/site - Remote Web Proxy: reach a device's HTTP/HTTPS UI through an agent (web_proxy.py, ws_proxy.py) - Remote Terminal: SSH/Telnet to a LAN device through an agent (term_proxy.py, AgentTerminalConsumer at ws/agent/<id>/term/) - VNC relay to a LAN device via the agent (WebVNC ?addr= + MeshCentral noVNC) - nginx /agentproxy/ routing added to install.sh and update.sh Coexists with the built-in agent terminal (TerminalStreamConsumer at ws/agent/<id>/terminal/<session_id>/). Adds deps: asyncssh, h11.
fd00c95 to
d7005b6
Compare
Remote Proxy & Network Devices
Adds the ability to reach a device on an agent's LAN (firewalls, switches, Proxmox/PBS, iDRAC, etc.) directly from the Tactical RMM UI — no MeshCentral Router, no local client, no manual port-forwarding, all over the existing HTTPS port.
Right-click an agent → Remote Proxy opens one window with a protocol selector:
It also adds a Network Devices tab (next to Servers/Workstations/Mixed) where you register devices (name / protocol / IP / port / description / ordered preferred agents) and Connect with one click. Agent selection walks the preferred list and probes reachability, skipping agents that can't actually reach the device, falling back to a random online agent (servers first).
How it works
meshrelay.ashx) to open a raw TCP tunnel toaddr:portthrough the agent (same mechanism as the existing WebVNC feature), withMemoryBIOTLS for HTTPS targets.h11) over the tunnel and rewrites responses so the device renders in an iframe (stripsX-Frame-Options/CSP, fixes redirects, root-relative URLs and ES-module imports; injects a runtime XHR/fetch/WebSocket shim for JS-built URLs). Cookies are forwarded byte-exact so__Host-/__Secure-tickets (Proxmox/PBS) survive.meshrelay.ashx: theWebVNCendpoint accepts an optional?addr=<ip>to relay to a device on the agent's LAN (instead of the agent itself) — no bundled client or extra dependency.asyncsshserver-side bridged to xterm.js; Telnet is a raw bridge with minimal IAC negotiation.can_use_mesh) and written to the audit log / history.Deployment — handled automatically
install.shgenerates thelocation ^~ /agentproxy/block (ASGI socket + WebSocket upgrade headers via a$connection_upgrademap) in both the API and frontend nginx vhosts.update.shidempotently patches the/agentproxy/block into existingrmm.conf/frontend.confon upgrade (backs up each file first) so existing installs get the feature without breakage. Validated withnginx -t.asyncssh,h11,uvicorn[standard],websockets) install viarequirements.txt; the ASGI server runs under uvicorn (daphne.service).Notes
develop.maintainer_can_modifyis enabled.tacticalrmm-web(Brand new install can't login #50).