- Added IPv4 and IPv6 address fields to the device setup form.
- Display VPN name in the header for clarity.
- Modified configuration generation to use inputted IP addresses.
- Updated server details and endpoints with dynamic data from VPN context.
- Implemented CSRF-secured device addition via API call.
These changes improve user input flexibility and streamline device configuration setup.
Introduced a new HTML template for setting up VPN devices. This template includes a form to input the device name, generating Wireguard configuration and displaying it both in text and as a QR code. Utilizes Wireguard Crypto library for key generation and QRCode.js for QR code generation.
This enhancement streamlines the VPN setup process for users by providing an automated way to generate necessary configuration and an easy-to-scan QR code for mobile devices.
Modified the port assignment logic to avoid potential collisions by pre-filtering used ports before selecting from the available pool. This ensures each VPN instance gets a unique port more efficiently, reducing the risk of assignment conflicts and improving the reliability of VPN setup.
Updated the port assignment logic to guarantee that a newly assigned port is unique by avoiding conflicts with existing port assignments. This addresses potential issues with port collisions that could disrupt VPN operations.
Added VPN and Device models to the Django admin site for easier management and interaction through the administrative interface. This change improves the efficiency of handling these models by providing easy access to their data and operations.
Replaced separate `first_name` and `last_name` fields with a unified
`name` field in the CustomUser model to simplify user data management.
Updated migration script to reflect this change.
This modification should streamline the handling of users' names, reduce
complexity in name fields, and address potential issues around name
localization and formatting.
Included CSRF_TRUSTED_ORIGINS for enhanced security based on ALLOWED_HOSTS. Updated ALLOWED_HOSTS config key from "AllowedHosts" to "Hosts" for consistency. Added `django_otp.plugins.otp_static` to INSTALLED_APPS for better OTP functionality.
Resolves issues with CSRF protection and OTP security.
- Integrated two-factor authentication URLs at the root level for cleaner URL structure
- Removed redundant custom login template, likely improving maintainability by relying on the default authentication views
Updated VSCode launch configuration to explicitly set the Django development server to run on port 8110. This ensures consistency across different development environments and resolves conflicts with default ports.
Added Two-Factor Authentication (2FA) using django-otp and django-two-factor-auth along with support for custom user models. Introduced necessary settings, middleware, and URL patterns to support 2FA. Updated dependencies in pyproject.toml and poetry.lock.
- Included `django_otp` and `two_factor` modules.
- Configured custom user model with email as the primary identifier.
- Added new migrations and models for CustomUser.
- Incorporated login templates for two-factor authentication.
- Enabled two-factor login URLs and middleware.
This enhancement strengthens account security by requiring a second authentication factor.
Introduce initial database migration to create VPN and Device models.
These models include fields for UUID primary keys, encrypted keys,
and subnet fields, with foreign key relations to user accounts and
VPN instances. This migration sets up essential entities for the VPN
module, providing the foundational structure for VPN and device
management.
Updated settings to ensure "ColdBrew" section exists in the config before accessing it. Defaulted `FIELD_ENCRYPTION_KEY` to a generated value if not present and corrected encoding. Made `ALLOWED_HOSTS` configurable via settings file and adjusted `DEBUG` logic to depend on `ALLOWED_HOSTS`.
Included a new launch.json for VSCode to enable easy debugging
of Django projects using the Python Debugger. This configuration
launches the Django server with debugpy, making it simpler for
developers to set breakpoints and debug their applications directly
within the editor.
Added MinValueValidator and MaxValueValidator for the port field in the VPN model to ensure values are between 10000 and 40000. This change enforces port number constraints directly in the model, preventing invalid entries and improving data integrity.
Initial setup of the ColdBrew Django-based VPN manager project. Added basic project structure including core Django configurations and essential files:
- Added `.gitignore` to exclude unnecessary files from version control.
- Introduced `LICENSE` with MIT license.
- Created basic `README.md` with setup and contribution guidance.
- Configured Django project settings with auto-generated secrets.
- Implemented essential VPN management models, views, and admin settings.
- Integrated core dependencies like Django Rest Framework, Celery for task management, and Redis for caching.
- Added Poetry for dependency management along with necessary dependencies for development and database support.