WireFlow - Seamless Secure Connections
- Overview
- Prerequisites
- Quick Start
- Detailed Setup
- Using the Web Client
- Managing VPN Clients
- Troubleshooting
- Advanced Configuration
WireFlow VPN provides a comprehensive solution for managing WireGuard VPN connections through a modern web interface. It includes:
- Web Client: Angular-based frontend for easy VPN management
- REST API: Flask-based backend for VPN operations
- WireGuard Integration: Full WireGuard VPN server support
- User Management: Authentication and authorization
- Monitoring: Real-time VPN statistics and system health
- Operating System: Windows 10/11, macOS, or Linux
- Python: 3.8 or higher
- Node.js: 18.0 or higher
- npm: 8.0 or higher
- Git: For cloning the repository
- WireGuard: For actual VPN connections (Linux/macOS)
- Docker: For containerized deployment
- Kubernetes: For cloud deployment
git clone https://github.com/wireflow/vpn.git
cd vpncd src/api
pip install --user -r requirements.txt
python app.pyThe API will start on http://localhost:8080
cd web-client
npm install
npm startThe web client will start on http://localhost:4200
Open your browser and navigate to http://localhost:4200
cd src/api
pip install --user -r requirements.txtCreate a .env file in the src/api directory:
JWT_SECRET=your-secret-key-here
DATABASE_URL=sqlite:///vpn.db
REDIS_URL=redis://localhost:6379python app.pyDefault Credentials:
- Username:
admin - Password:
admin123
cd web-client
npm installEdit web-client/src/app/app.component.ts to change the API base URL:
private readonly API_BASE = 'http://localhost:8080';npm startdocker-compose up -d vpn-api redisThis will start:
- VPN API on port 8080
- Redis cache on port 6379
- All supporting services
When you first access the web client at http://localhost:4200, you'll see:
- System Status: Shows if the API is online
- Client Count: Number of active VPN clients
- Health Check: Real-time system health
- Action Buttons: For refreshing status and managing clients
- API Status: Green ✅ indicates API is responding
- System Health: Shows overall system status
- Last Result: Displays the latest operation result
- View Clients: See all configured VPN clients
- Client Details: IP addresses, connection status, data usage
- Add Clients: Create new VPN client configurations
- Remove Clients: Delete unused client configurations
- WireGuard Status: VPN server statistics
- System Resources: CPU, memory, and disk usage
- Connection Statistics: Data transfer metrics
The web interface provides intuitive navigation:
- Refresh Status: Updates all system information
- Load Clients: Fetches current client list
- System Status: Shows detailed system metrics
- Access the API: Use the
/api/clientsPOST endpoint - Provide Client Name: Choose a unique identifier
- Automatic Configuration: The system generates:
- Private/Public key pair
- IP address assignment
- Client configuration file
curl -X POST http://localhost:8080/api/clients \
-H "Content-Type: application/json" \
-d '{"name": "my-client"}'Each client receives:
- Private Key: For client authentication
- Public Key: For server verification
- IP Address: Assigned from the VPN subnet
- Configuration File: Ready-to-use WireGuard config
Access client configuration via:
GET /api/clients/{client_id}/config
Get QR code for mobile clients:
GET /api/clients/{client_id}/qr
Symptoms: Web client shows "API connection failed" Solutions:
- Verify API server is running on port 8080
- Check firewall settings
- Ensure no other service is using port 8080
Symptoms: 401 Unauthorized responses Solutions:
- Use default credentials: admin/admin123
- Check JWT token expiration
- Verify API secret key configuration
Symptoms: 500 errors on status endpoints Solutions:
- Install WireGuard on Linux/macOS
- On Windows, the system uses mock data
- Check WireGuard installation path
Symptoms: Database connection errors Solutions:
- Check SQLite file permissions
- Verify database URL configuration
- Restart the API server
Monitor the console output for:
- Database initialization messages
- Client creation confirmations
- Error details and stack traces
Check browser developer tools for:
- Network request failures
- JavaScript errors
- CORS issues
- Monitor system resources via
/api/status - Restart API server if needed
- Check for memory leaks in long-running processes
- Verify network connectivity
- Check database performance
- Monitor system resource usage
| Variable | Default | Description |
|---|---|---|
JWT_SECRET |
your-secret-key-change-this |
Secret key for JWT tokens |
DATABASE_URL |
sqlite:///:memory: |
Database connection string |
REDIS_URL |
redis://localhost:6379 |
Redis cache connection |
DATABASE_URL = 'sqlite:///vpn.db'DATABASE_URL = 'postgresql://user:password@localhost/vpn_db'DATABASE_URL = 'mysql://user:password@localhost/vpn_db'- Change Default Passwords: Update admin credentials
- Use Strong JWT Secret: Generate a secure random key
- Enable HTTPS: Use SSL certificates
- Firewall Configuration: Restrict access to necessary ports
- Regular Updates: Keep dependencies updated
- JWT tokens expire after 24 hours
- Implement proper session management
- Consider multi-factor authentication
- CPU and memory usage tracking
- Network interface statistics
- Disk space monitoring
- Client connection status
- Data transfer metrics
- Connection duration tracking
- Application logs via Python logging
- Access logs via Flask
- Error tracking and alerting
# SQLite backup
cp vpn.db vpn_backup_$(date +%Y%m%d).db# Backup WireGuard configs
tar -czf wireguard_configs_$(date +%Y%m%d).tar.gz data/wireguard/POST /api/auth/login- User loginGET /api/auth/logout- User logout
GET /api/clients- List all clientsPOST /api/clients- Create new clientGET /api/clients/{id}/config- Get client configGET /api/clients/{id}/qr- Get QR codeDELETE /api/clients/{id}- Delete client
GET /health- Health checkGET /api/status- System statusGET /api/servers- VPN server info
- Check the troubleshooting section
- Review API logs for error details
- Consult the project documentation
- Follow the coding standards
- Write comprehensive tests
- Update documentation
- Submit pull requests
This project is licensed under the MIT License. See LICENSE file for details.
Last Updated: September 2025 Version: 0.1