How kushalongit-hub/openconnect works
OpenConnect is a mobile-first remote-control dashboard for a Windows PC. A phone browser loads the dashboard from the Express server, then uses it for a live shell, keyboard shortcuts, and Sunshine availability checks. Terminal input and output pass through Socket.IO and the server’s PTY; shortcut input is relayed through the /bridge WebSocket to the Go helper, which injects Windows input. For desktop streaming, the dashboard offers Moonlight launch options while Sunshine handles the stream. The README documents the UI capabilities; frontend implementation details were not sampled.
Main entry points: index.html Dashboard UI · server.js Socket.IO · main.go Native bridge
Components 16
Mobile dashboard
- Dashboard UI
mobile-term/public/index.html - Express server
mobile-term/server.js
Remote input
- Shortcut controls
mobile-term/public/index.html - Bridge WebSocket
mobile-term/server.js - Native bridge
mobile-term/native-bridge/main.go - Windows SendInput
mobile-term/native-bridge/main.go
GUI streaming
- Sunshine status
mobile-term/server.js - Sunshine
- Moonlight options
mobile-term/public/index.html - Hardware-accelerated stream
Other components
- Phone browser
- Windows shell
- Moonlight app
- Moonlight web player
Connections 21
- Phone browser → Dashboard UI: opens
- Dashboard UI → Express server: loads from
- Dashboard UI → Socket.IO: sends terminal I/O
- Socket.IO → PTY shell: writes and resizes
- PTY shell → Windows shell: runs
- PTY shell → Socket.IO: returns output
- Socket.IO → Dashboard UI: sends output
- Dashboard UI → Shortcut controls: uses
- Shortcut controls → Socket.IO: sends shortcut input
- Socket.IO → Bridge WebSocket: relays input
- Bridge WebSocket → Native bridge: sends messages
- Native bridge → Windows SendInput: injects input
- Dashboard UI → Sunshine status: checks status
- Sunshine status → Sunshine: probes port
- Sunshine status → Dashboard UI: returns status
- Dashboard UI → Moonlight options: selects playback
- Moonlight options → Moonlight app: launches app
- Moonlight options → Moonlight web player: opens player
- Moonlight app → Sunshine: streams from
- Moonlight web player → Sunshine: streams from
- Sunshine → Hardware-accelerated stream: captures and streams