-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add web UI for VPN deployment #14916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Implements issue #196 - a local web application that allows users to deploy Algo VPN servers through a browser-based GUI. Features: - Single-step launch: `./algo-web` opens browser automatically - Cloud provider support: DigitalOcean, Hetzner, Linode, Vultr (MVP) - Real-time credential validation via provider APIs - Dynamic region loading after validation - Live deployment progress streaming via SSE - Terminal-style output with color-coded log lines - Config file downloads (individual + ZIP archive) Technical stack: - Starlette + uvicorn (ASGI web framework) - htmx for frontend interactivity (no build step) - Server-Sent Events for streaming Ansible output - Credentials passed via --extra-vars (never persisted) Design: - "Luxury Terminal" dark theme with electric teal accents - Algo VPN and Trail of Bits branding - Responsive layout (desktop, tablet, mobile) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Code Review - Web UI for VPN DeploymentThis is a well-architected feature with good security practices. Here are the key findings: Critical Issues1. Credentials exposed in HTML (app/templates/partials/regions.html:18-20) 2. No CSRF protection 3. Rate limiting missing High Priority4. Session cleanup (app/sessions.py:101-105) 5. No authentication 6. Unbounded output storage (app/sessions.py:42-44) Medium Priority7. Missing input validation (app/main.py:174-188) 8. ZIP bomb vulnerability (app/main.py:308-312) 9. Process orphaning (app/runner.py:171-193) 10. Incomplete Vultr implementation (app/runner.py:42-43) Minor Issues
RecommendationsBefore merge (required):
Follow-up PRs:
SummaryExcellent architecture with proper subprocess handling and path traversal protection. The credential exposure issue is critical and must be fixed before merge. Adding tests is essential for a feature handling sensitive data. Assessment: Approve with required changes (fix issue 1, add tests) |
Remove Google Fonts dependency to ensure the web UI works completely offline. Uses high-quality system font stacks: - Mono: ui-monospace, SF Mono, Menlo, Consolas - Sans: system-ui, Segoe UI, Roboto, Helvetica Neue 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Code Review: Web UI for VPN DeploymentThis is a well-structured feature implementation with good separation of concerns. However, there are critical security issues that must be addressed before merge. Critical Security Issues1. Credentials Exposed in HTML (app/templates/partials/regions.html:18-20) - MUST FIX BEFORE MERGE API tokens are embedded as hidden form fields, making them visible in Browser DevTools, page source, and network inspector. Store credentials server-side in the session after validation instead. 2. No CSRF Protection - POST endpoints lack CSRF tokens. Add CSRF middleware. 3. No Rate Limiting - The validation endpoint has no rate limiting, allowing credential brute-forcing and DoS attacks. High Priority Issues4. Unbounded Output Storage (app/sessions.py:42-44) - output_lines grows indefinitely. Add max size limit. 5. No Input Validation (app/main.py:174-188) - users and server_name not validated before passing to Ansible. Add regex validation. 6. ZIP Bomb Vulnerability (app/main.py:308-312) - No size limit on ZIP creation. Add 100MB limit. 7. No Authentication - If ALGO_WEB_HOST=0.0.0.0, anyone can deploy servers and access credentials. Document security implications. 8. Process Orphaning (app/runner.py:109-117) - Server crash leaves Ansible processes running. Add shutdown handler. Medium Priority Issues9. Passive Session Cleanup - Only cleaned during create(). Add background cleanup task. 10. Incomplete Vultr Implementation - Comment at runner.py:42-43 mentions unimplemented feature. 11. Hardcoded Timeouts - 15s validation, 10s cancellation. Make configurable. 12. No Health Endpoint - Add /health endpoint for monitoring. Good Practices Observed
Missing TestsCRITICAL: No tests for this major feature handling sensitive data. Need:
Per CLAUDE.md: "Test everything" Before Merge ChecklistRequired:
Strongly Recommended:
SummaryArchitecture: Excellent Assessment: Approve with required changes Fix issues 1, 5, and add tests before merging. Great work on the implementation - just need to shore up security aspects! |
Summary
Implements #196 - a local web application that allows users to deploy Algo VPN servers through a browser-based GUI.
./algo-webopens browser automaticallyScreenshots
The UI uses a "Luxury Terminal" dark theme with the official Algo VPN and Trail of Bits branding:
Technical Details
Stack:
Security:
--extra-varsJSON (never persisted to disk)Usage
./algo-web # Opens http://127.0.0.1:8080 in browserTest Plan
./algo-weband verify browser opens🤖 Generated with Claude Code