Fix layout bug, tabs height, and RDP tunnel UUID handshake

- MainLayout: replace inner <Layout> with row-flex div so sidebar and
  session tabs appear side-by-side instead of stacked vertically
- global.css: add Ant Design Tabs CSS overrides so tab pane content
  fills available height (SSH terminal and RDP canvas sized correctly)
- rdp.ts: send guacd's ready-UUID as first WebSocket message so
  Guacamole.WebSocketTunnel completes its tunnel handshake correctly
- RdpTab: add connecting/error/disconnected status overlays for
  visibility when RDP fails

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
deadRabbit
2026-02-22 13:20:51 +01:00
parent 3e99d8a529
commit 07da63a68e
5 changed files with 103 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
import { createConnection, Socket } from 'net';
import { randomUUID } from 'crypto';
import { FastifyInstance, FastifyRequest } from 'fastify';
import { SocketStream } from '@fastify/websocket';
import { WebSocket } from 'ws';
@@ -165,7 +166,12 @@ export async function rdpWebsocket(fastify: FastifyInstance) {
throw new Error(`guacd handshake failed: expected 'ready', got '${readyInstruction[0]}'`);
}
// 5. Flush any buffered bytes that arrived after 'ready'
// 5. Send the guacd connection UUID as the first WebSocket message.
// Guacamole.WebSocketTunnel expects this as its tunnel-UUID handshake.
const guacdUUID = readyInstruction[1] ?? randomUUID();
socket.send(guacdUUID);
// 6. Flush any buffered bytes that arrived after 'ready'
if (tcpBuf.value.length > 0 && socket.readyState === WebSocket.OPEN) {
socket.send(tcpBuf.value);
tcpBuf.value = '';