fix: integrate hardened APT security boundary

This commit is contained in:
2026-08-19 21:36:24 +00:00
parent b6df6f1a66
commit 2f492b662d
14 changed files with 1113 additions and 1730 deletions
+33 -41
View File
@@ -3,45 +3,35 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;">
<title>Alta Video Camera Proxy with API</title>
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'none'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'none';">
<title>Alta Video Camera Proxy</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="app-container">
<!-- Main Content Layout -->
<div class="main-layout">
<!-- Left Sidebar - Available Devices -->
<aside class="devices-sidebar">
<div class="sidebar-header">
<h2>Available Devices</h2>
</div>
<div class="sidebar-header"><h2>Available Devices</h2></div>
<div id="deviceStatus" class="status-message"></div>
<!-- Device Search -->
<div class="device-search-container">
<input type="text" id="deviceSearch" placeholder="Search devices..." class="device-search-input">
<input type="text" id="deviceSearch" placeholder="Search devices..." class="device-search-input" autocomplete="off">
</div>
<div class="device-list-container">
<div id="deviceList" class="device-list">
<p class="placeholder-text">Connect to API to load devices</p>
<p class="placeholder-text">Connect through the paired Chrome extension to load devices</p>
</div>
</div>
</aside>
<!-- Main Content Area -->
<main class="main-content">
<div class="content-header">
<h1>Alta Video Camera Proxy</h1>
<button type="button" id="checkUpdateBtn" class="btn-update" title="Check for Updates">
<button type="button" id="checkUpdateBtn" class="btn-update" title="Securely check GitPeji for a newer release">
<span class="update-icon">&#x21bb;</span>
<span class="update-text">Check for Updates</span>
</button>
</div>
<!-- API Connection Section -->
<section class="content-section">
<h2>API Connection</h2>
<div class="connection-status">
@@ -59,21 +49,34 @@
<div id="connectionStatus" class="status-message"></div>
</section>
<!-- Cookie-Based Camera Proxy Section -->
<section class="content-section pairing-section">
<h2>Bridge Pairing</h2>
<p class="section-help">Only the committed APT Chrome extension can send a session. Pair it with a one-time secret.</p>
<div class="status-row">
<label>Pairing:</label>
<span id="pairingState" class="unpaired">Checking...</span>
</div>
<div id="pairingSecretRow" class="pairing-secret-row" style="display: none;">
<label for="pairingSecret">One-time secret:</label>
<input type="text" id="pairingSecret" readonly autocomplete="off" spellcheck="false">
<small>Paste this into the extension pairing settings now. APT will not show it again.</small>
</div>
<div class="proxy-buttons">
<button type="button" id="rotatePairingBtn" class="btn-primary">Generate / Rotate</button>
<button type="button" id="revokePairingBtn" class="btn-outline">Revoke</button>
</div>
</section>
<section class="content-section">
<h2>Camera Proxy</h2>
<div class="proxy-controls">
<div class="input-row">
<label for="cookieDeviceUUID">Device UUID:</label>
<input type="text" id="cookieDeviceUUID" placeholder="(Auto-filled when you select a device from the list)" readonly>
</div>
<div class="input-row" style="display: none;">
<label for="cookieKey">Cookie Key:</label>
<input type="text" id="cookieKey" placeholder="Paste your cookie key here">
<label for="selectedDeviceId">Device UUID:</label>
<input type="text" id="selectedDeviceId" placeholder="Select a device from the list" readonly>
</div>
<div class="proxy-buttons">
<button type="button" id="startCookieProxyBtn" class="btn-primary" disabled>Start Proxy</button>
<button type="button" id="stopCookieProxyBtn" class="btn-outline" disabled>Stop Proxy</button>
<button type="button" id="startProxyBtn" class="btn-primary" disabled>Start Proxy</button>
<button type="button" id="stopProxyBtn" class="btn-outline" disabled>Stop Proxy</button>
</div>
</div>
</section>
@@ -81,26 +84,15 @@
</div>
</div>
<!-- Update Modal -->
<div id="updateModalOverlay" class="update-modal-overlay" style="display: none;">
<div id="updateNotice" class="update-modal-overlay" style="display: none;">
<div class="update-modal-card">
<div class="update-modal-header">
<h3>Update Available</h3>
<button type="button" id="updateModalCloseBtn" class="update-modal-close">&times;</button>
</div>
<div class="update-modal-header"><h3>Update Available</h3></div>
<div class="update-modal-body">
<p id="updateModalMessage" class="update-modal-message"></p>
<div id="updateModalNotes" class="update-modal-notes"></div>
<div id="updateProgressContainer" class="update-progress-container" style="display: none;">
<div class="update-progress-track">
<div id="updateProgressFill" class="update-progress-fill" style="width: 0%"></div>
</div>
<span id="updateProgressText" class="update-progress-text">0%</span>
</div>
<p id="updateMessage" class="update-modal-message"></p>
</div>
<div class="update-modal-footer">
<button type="button" id="updateInstallBtn" class="btn-primary">Install Update</button>
<button type="button" id="updateLaterBtn" class="btn-outline">Later</button>
<button type="button" id="openReleasesBtn" class="btn-primary">Open GitPeji Releases</button>
<button type="button" id="dismissUpdateBtn" class="btn-outline">Later</button>
</div>
</div>
</div>