Refactored the code to pass configuration sections as parameters to server creation functions instead of accessing them globally. This enhances modularity and clarity by making function dependencies explicit. Additionally, consolidated configuration reading and argument parsing in the main function, and added a validation step to check for required configuration sections.
This change makes the codebase more maintainable and prepares it for potential future extensions.
Renamed the 'chimpman_config' variable to 'peer_config' for clarity, and updated the print statement to more accurately reflect the content being displayed. This improves code readability and eliminates the use of ambiguous terminology.
No changes to functionality.
Added optional manual configuration for Wireguard private and preshared keys in the configuration file. If these keys are not provided, they will be automatically generated as previously.
This flexibility allows users to specify their own keys, thus integrating custom security needs and syncing with existing setups more seamlessly.
Updated configuration script to include IPv4 rules alongside existing IPv6 rules for iptables. This ensures that both protocols are properly handled, enhancing network versatility and compatibility. Enabled IPv4 forwarding in sysctl to support the new rules.
Introduce a new feature to automate the creation and configuration of WireGuard VPN servers across multiple cloud providers (Hetzner, AWS, DigitalOcean, Azure). Changes include:
- Added a `.gitignore` file to exclude `config.ini` and `venv/`.
- Provided `config.dist.ini` with configuration templates for supported providers.
- Created a `requirements.txt` listing all necessary dependencies.
- Developed `worker.py` to handle server creation, WireGuard setup, and configuration management.
This enhancement simplifies and standardizes VPN server deployment, improving operational efficiency and consistency.