⚠️ Attention! This project is under development and is not yet ready for use. Stay tuned for updates!
pyWGgen is a modern WireGuard management system that includes:
- Configuration and QR code generation.
- User and expiration management.
- Removal of outdated data.
- A web interface based on Gradio and a console menu for management.
- Key Features
- Gradio Web Interface
- Requirements
- Installing and Running the Project
- Using the Menu
- Project Structure
- Testing
- Updating
- License
- Contacts
- Configuration Generation: Create configuration files and QR codes.
- Expiration Management: Check and update user data.
- Automation: Remove outdated accounts and sync with the WireGuard server.
- Web Interface: Easy-to-use interface powered by Gradio.
- Pre-Creation Validation: Prevent data duplication.
- Updates and Reports: Simplified updates and detailed reports.
Gradio provides an intuitive interface for managing the system. With it, you can:
- View and edit users.
- Create new configurations.
- Manage server status.
- Generate system state reports.
- Select g. 🌐 Open Gradio Admin Panel in the console menu.
- The admin panel will launch on port 7860:
http://127.0.0.1:7860 - For external access, open the port in
firewalld. Gradio will also generate a temporary public link:🌐 Public link: https://<unique_address>.gradio.live
- Python 3.8+ (Python 3.11 recommended).
- Git for cloning the repository.
- Node.js for Gradio support.
- lsof for port checks.
- firewalld for managing network rules.
sudo dnf update -y && sudo dnf install epel-release -y && \
curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash - && \
sudo dnf install -y nodejs && node --version && \
sudo dnf update -y && \
sudo dnf install git mc htop tar gcc curl openssl-devel bzip2-devel libffi-devel zlib-devel -y && \
sudo dnf install net-tools lsof nano -y && \
sudo dnf install python3.11 -y && \
sudo alternatives --set python3 /usr/bin/python3.11 && python3 --version- System Update:
sudo dnf update -y. - Install EPEL repository: To obtain additional packages.
- Installing Node.js: Via the official NodeSource.
- Updating system packages and installing dependencies:
- Development tools (
gcc,curl,openssl-devel,bzip2-devel,libffi-devel,zlib-devel). - Utilities (
net-tools,lsof,mc).
- Development tools (
- Installation of Python 3.11: Followed by customization as a major version of Python.
Run the following commands:
mkdir -p pyWGgenerator && cd pyWGgenerator
wget https://raw.githubusercontent.com/licht8/pyWGgen/refs/heads/main/run_project.sh
chmod +x run_project.sh
./run_project.sh- Creates a
pyWGgendirectory. - Downloads and executes the
run_project.shscript. - Sets up a virtual environment and installs libraries.
The console menu provides convenient access to the project's main features:
🛡️ ====== Menu pyWGgen ======= 🛡️
------------------------------------------
g. 🌐 Open Gradio Admin Panel
u. 👤 Manage Users
sy. 📡 Synchronize Users
du. 🧹 Clear User Database
------------------------------------------
rw. ♻️ Reinstall WireGuard
dw. 🗑️ Remove WireGuard
iw. ⚙️ Install WireGuard
up. 🔄 Update Dependencies
------------------------------------------
i. 🛠️ Project Status Information
rg. 📋 Generate Project Status Report
fr. 📄 Show Project Status Report
dg. 🛠️ Run Project Diagnostics
sd. 📋 Show Diagnostics Log
t. 🧪 Run Tests
🧩 === Help and Diagnostics Section ==== 🧩
aih. 🗨️ Help and Diagnostics
aid. 🤖 Run Project Diagnostics
0 or q. Exit
==========================================
pyWGgen/
├── ai_assistant/
│ ├── chats/ # Stores chat logs and history related to the AI assistant.
│ ├── contexts/ # Contextual data used by the AI assistant for generating responses.
│ ├── inputs/ # Input files and data used by the AI assistant.
│ ├── logs/ # Logs generated during AI assistant operations.
│ ├── models/ # Pre-trained and custom models used by the AI assistant.
│ ├── outputs/ # Output files and generated data from the AI assistant.
│ ├── prompts/ # Prompt templates and configurations for the AI assistant.
│ └── scripts/ # Custom scripts related to the AI assistant's functionality.
├── ai_diagnostics/
│ ├── ai_help/ # Contains diagnostic tools and scripts for AI troubleshooting.
│ ├── modules/ # Additional modules for AI diagnostics.
├── docs/ # Documentation for the project.
├── gradio_admin/
│ ├── functions/ # Core utility functions used by the Gradio admin interface.
│ └── tabs/ # Tabs and sections for the Gradio interface.
├── logs/ # General logs for the entire project.
├── modules/ # Core project modules for various functionalities.
├── temp/ # Temporary files and data.
├── test/ # Test scripts and files for the project.
├── user/ # User-specific data and configurations.
│ └── data/ # Detailed user data structure.
│ ├── logs/ # User-specific logs.
│ ├── qrcodes/ # QR codes generated for users.
│ ├── usr_stale_config/ # Stale or outdated user configurations.
│ └── wg_configs/ # WireGuard configuration files for users.
└── venv/ # Python virtual environment for the project dependencies.
To update the project you can start .sh script:
./run_project.shOr select up. 🔄 Update Dependencies in the console menu.
This project is distributed under the MIT License.
If you have questions, create an Issue.