Strip ~966 lines of unused code after transitioning to cookie-only auth: profile CRUD handlers, encryption helpers, username/password proxy launcher, proxy check/version handlers, dead preload methods, orphaned CSS (modals, profiles, nav tabs, collapsible sections), unused DOM elements and renderer functions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Alta Video Camera Proxy
An Electron desktop application for managing Alta Video camera proxy connections with API integration. This application allows you to authenticate with your Alta deployment, browse available cameras, and launch camera proxy connections through an external executable.
Features
- Encrypted Profile Management: Store multiple connection profiles with AES-encrypted passwords
- API Integration: Secure authentication and device discovery via Alta Video API
- Camera Proxy Management: Launch and manage up to 2 simultaneous camera proxy connections
- Device Filtering: Automatically filters to show only local (non-cloud) cameras
- Device Search: Quick search functionality to find cameras by name, ID, IP, or model
- Real-time Status: Live connection status and device online/offline indicators
- Modern Dark UI: Professional dark-mode interface with responsive design
- Cookie-Based Proxy: Alternative cookie-based authentication method (requires aware-cam-proxy.exe)
Prerequisites
- Node.js (version 14 or higher)
- npm (comes with Node.js)
- Valid Alta Video API credentials
- Windows OS (required for camera proxy executable)
- aware-cam-proxy-win.exe (camera proxy executable) - must be placed in the application directory
Installation
- Clone or download this project
- Open a terminal in the project directory
- Install dependencies:
npm install
Usage
Starting the Application
npm start
Or for development mode with DevTools:
npm run dev
Creating a Connection Profile
- Click "Add User" to create a new profile
- Enter:
- Profile Name: A friendly name for this profile
- Deployment URL: Your Alta deployment URL (e.g.,
https://your-deployment.eu1.aware.avasecurity.com) - Username: Your Alta username
- Password: Your Alta password (stored encrypted)
- Click "Save Profile"
Connecting to Alta API
- Select a profile from the dropdown
- Click "Connect to API"
- Devices will automatically load and display in the left sidebar
Launching Camera Proxy
- Connect to API first
- Select a device from the left sidebar (click on a device name)
- Click "Start Camera Proxy"
- A command prompt window will open
- Password is copied to clipboard - press Ctrl+V when prompted
- The proxy will establish connection to the camera
Note: You can run up to 2 simultaneous camera proxy connections. Active connections are indicated with a green "PROXY ACTIVE" badge on the device.
API Endpoints Used
- Authentication:
POST /api/v1/dologin- User login - Device List:
GET /api/v1/devices- Retrieve all devices - Auth Info:
GET /api/v1/auth- Verify authentication status
Camera Proxy Methods
Username/Password Method
Uses aware-cam-proxy-win.exe with credentials:
aware-cam-proxy-win.exe -a <domain> -u <username> -d <device-uuid>
Cookie Method (Alternative)
Uses aware-cam-proxy.exe with cookie authentication:
aware-cam-proxy.exe -a <domain> -d <device-uuid> -k <cookie-key>
Security Features
- Context Isolation: Renderer process is isolated from Node.js APIs
- Preload Script: Secure IPC communication between main and renderer processes
- Encrypted Storage: Passwords are encrypted using AES encryption before storage
- No Hardcoded Credentials: All credentials are entered and managed by the user
- Profile-Based Authentication: Secure profile management with encrypted credential storage
⚠️ Security Note: Encryption key is derived from machine identifiers (hostname, homedir, username) via SHA-256. Profiles are not portable between machines.
File Structure
├── main.js # Main Electron process (IPC handlers, API, proxy spawning, encryption)
├── renderer.js # Renderer process (UI logic, state management, event handlers)
├── preload.js # Secure IPC bridge (contextBridge)
├── index.html # Static HTML shell (CSP enforced)
├── styles.css # Dark theme styling (CSS custom properties)
├── package.json # Project dependencies and build config
├── assets/
│ └── icon.png # Application icon
├── CLAUDE.md # Claude Code project instructions
└── README.md # This file
External executables (not included in repo — must be placed in app directory):
aware-cam-proxy-win.exe— username/password auth proxy (required)aware-cam-proxy.exe— cookie-based auth proxy (optional)
Profile Storage
Profiles are stored in: ~/.alta-api-profiles.json (user home directory)
Troubleshooting
Connection Issues
- Verify your deployment URL is correct and accessible
- Check your username and password
- Ensure your network allows HTTPS connections to the deployment
- Check if your account requires 2FA (not currently supported)
Camera Proxy Issues
- Executable not found: Ensure
aware-cam-proxy-win.exeis in the application directory - Proxy won't start: Check that you're connected to the API and have selected a device
- Maximum connections: You can only run 2 simultaneous connections - stop an existing one first
- Command window closes immediately: Check credentials and network connectivity
Device List Issues
- Ensure you're connected to the API first
- Check that your user account has permissions to view devices
- No devices shown: You may only have cloud cameras (localStorage=true) which are filtered out
- Use the search box to find specific devices
API Documentation
This application is built according to the Avigilon Alta Video API documentation. For more advanced features or custom integrations, refer to the official API documentation.
Limitations
- Windows Only: Camera proxy executables are Windows-specific (.exe files)
- 2FA Not Supported: Two-factor authentication is not currently supported
- Connection Limit: Maximum of 2 simultaneous camera proxy connections
- Local Cameras Only: Automatically filters out cloud-based cameras (localStorage=true)
- No Session Refresh: Sessions may expire and require reconnection
- Executable Required:
aware-cam-proxy-win.exemust be obtained separately
Building for Distribution
# Build portable Windows executable
npm run build
# Output will be in: dist/AltaCameraProxy-1.0.0-portable.exe
Important: Copy aware-cam-proxy-win.exe to the same directory as the built executable before distribution.
Development
To modify or extend this application:
- Main Process (main.js): Electron app lifecycle, API requests, and process management
- Renderer Process (renderer.js): UI interactions and state management
- Preload Script (preload.js): Secure IPC bridge with context isolation
- Styling (styles.css): Dark mode theme and responsive design
Adding New API Endpoints
- Add IPC handler in main.js using
ipcMain.handle() - Expose method in preload.js via
contextBridge.exposeInMainWorld() - Call from renderer.js using
window.electronAPI.yourMethod()
License
MIT License - Feel free to modify and distribute as needed.