VNC client

This commit is contained in:
2026-09-15 01:01:27 -04:00
parent 92c0348740
commit 7023b3c358
70 changed files with 7 additions and 6 deletions
+7 -6
View File
@@ -5,16 +5,17 @@ import { fileURLToPath } from 'node:url';
import { registerSocket } from './websocket.mjs';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const NOVNC = path.join(__dirname, '../../node_modules/@novnc/novnc');
const NOVNC_PKG = path.join(__dirname, '../../node_modules/@novnc/novnc');
const NOVNC_APP = path.join(__dirname, '../../public/vnc');
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/vnc.html', (req, res) =>
res.sendFile(path.join(__dirname, '../../public/vnc.html'))
);
vncRouter.use('/novnc/app', express.static(path.join(__dirname, '../../public/vnc')));
vncRouter.use('/novnc', express.static(NOVNC));
vncRouter.use('/novnc', express.static(NOVNC_APP));
vncRouter.use('/novnc', express.static(NOVNC_PKG));
vncRouter.get('/novnc/defaults.json', (req, res) => res.json({}));
vncRouter.get('/novnc/mandatory.json', (req, res) => res.json({}));
vncRouter.get('/', (req, res) =>
res.redirect('/vnc/novnc/vnc.html?path=ws/vnc&autoconnect=true&resize=scale')