mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
feat: add VNC WebSocket console support for Docker and QEMU nodes
Add VNC console WebSocket endpoints for Docker and QEMU nodes: - Add /console/vnc WebSocket endpoint to compute API (Docker & QEMU) - Add /console/vnc WebSocket endpoint to controller API - Implement start_vnc_websocket_console() in BaseNode - Forward VNC WebSocket traffic between controller and compute layers The implementation provides bidirectional WebSocket to TCP forwarding for VNC protocol (RFB) connections, allowing browser-based VNC console access to containers and VMs. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
09aa12cf94
commit
ba92b405da
4 files changed
+176
-1
No files matched your search
@@ -384,6 +384,21 @@ async def console_ws(
|
||||
await node.start_websocket_console(websocket)
|
||||
|
||||
|
||||
@router.websocket(
|
||||
"/{node_id}/console/vnc"
|
||||
)
|
||||
async def vnc_console_ws(
|
||||
websocket: Union[None, WebSocket] = Depends(ws_compute_authentication),
|
||||
node: DockerVM = Depends(dep_node)
|
||||
) -> None:
|
||||
"""
|
||||
VNC Console WebSocket.
|
||||
"""
|
||||
|
||||
if websocket:
|
||||
await node.start_vnc_websocket_console(websocket)
|
||||
|
||||
|
||||
@router.post(
|
||||
"/{node_id}/console/reset",
|
||||
status_code=status.HTTP_204_NO_CONTENT,
|
||||
|
||||
Reference in new issue
Block a user