From ecc7ef5a8a8b66b9bf9d6a10eb16957d1009ddcb Mon Sep 17 00:00:00 2001 From: ztimson Date: Tue, 15 Sep 2026 00:43:32 -0400 Subject: [PATCH] VNC client --- client/public/index.html | 2 +- client/public/{desktop.html => vnc.html} | 0 client/src/services/vnc.mjs | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) rename client/public/{desktop.html => vnc.html} (100%) diff --git a/client/public/index.html b/client/public/index.html index db9f66c..e77e089 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -502,7 +502,7 @@ { name: 'AI Assistant', url: ':1000', icon: 'fa-robot' }, { name: 'ATAK', url: ':1100', icon: 'fa-shield-halved', badge: 'fa-download' }, { name: 'Code Book', url: '/code-book.html', icon: 'fa-lock', badge: 'fa-download', badgeAction: 'saveCodeBook' }, - { name: 'Desktop', url: '/desktop.html', icon: 'fa-desktop', badge: 'fa-download' }, + { name: 'Desktop', url: '/vnc', icon: 'fa-desktop', badge: 'fa-download' }, { name: 'File Browser', url: ':1300', icon: 'fa-folder' }, { name: 'Library', url: ':1400', icon: 'fa-book', badge: 'fa-cog', badgeAction: 'openKiwix' }, { name: 'Maps', url: ':1500', icon: 'fa-map' }, diff --git a/client/public/desktop.html b/client/public/vnc.html similarity index 100% rename from client/public/desktop.html rename to client/public/vnc.html diff --git a/client/src/services/vnc.mjs b/client/src/services/vnc.mjs index 9bd8d3d..ee5cd15 100644 --- a/client/src/services/vnc.mjs +++ b/client/src/services/vnc.mjs @@ -10,15 +10,15 @@ const VNC_HOST = process.env.VNC_HOST || '127.0.0.1'; const VNC_PORT = process.env.VNC_PORT || 5900; export const vncRouter = express.Router(); -vncRouter.get('/novnc/desktop.html', (req, res) => - res.sendFile(path.join(__dirname, '../../public/desktop.html')) +vncRouter.get('/novnc/vnc.html', (req, res) => + res.sendFile(path.join(__dirname, '../public/vnc.html')) ); vncRouter.use('/novnc', express.static(NOVNC)); + vncRouter.get('/', (req, res) => res.redirect('/vnc/novnc/vnc.html?path=ws/vnc&autoconnect=true&resize=scale') ); -// Namespaced so other websocket features can register alongside this one const wss = registerSocket('/ws/vnc', { handleProtocols: protocols => (protocols.has('binary') ? 'binary' : false) });