# đŸ›Ąïž WGSecure (WGS) ![Version](https://img.shields.io/badge/version-0.4.0-blue?style=flat-square) ![Python](https://img.shields.io/badge/Python-3.11+-3776ab?style=flat-square&logo=python&logoColor=white) ![PyQt6](https://img.shields.io/badge/PyQt6-6.4+-41cd52?style=flat-square&logo=qt&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-compatible-fcc624?style=flat-square&logo=linux&logoColor=black) ![Windows](https://img.shields.io/badge/Windows-10%2B-0078d4?style=flat-square&logo=windows&logoColor=white) ![MFA](https://img.shields.io/badge/MFA-TOTP-e74c3c?style=flat-square) ![WireGuard](https://img.shields.io/badge/WireGuard-VPN-88171a?style=flat-square) **WGSecure** est une interface graphique multiplateforme (Windows & Linux) pour gĂ©rer une connexion WireGuard avec une surcouche MFA (authentification Ă  deux facteurs TOTP). --- ## ✹ FonctionnalitĂ©s | # | FonctionnalitĂ© | DĂ©tail | |---|---|---| | đŸ–„ïž | **Interface systray** | IcĂŽne bouclier dans la barre de notification, connexion en un clic | | đŸ‘€ | **Mode User** (dĂ©faut) | Connexion / dĂ©connexion WireGuard, statut RX/TX en temps rĂ©el | | ⚙ | **Mode Admin** | Configuration complĂšte, protĂ©gĂ© par mot de passe | | 🔑 | **GĂ©nĂ©ration de clĂ©s** | Paire Curve25519 native (sans dĂ©pendance au binaire `wg`) | | đŸ›Ąïž | **Configuration WireGuard** | Serveur, port UDP, DNS, IP client, keepalive | | 🔐 | **MFA TOTP** | Compatible Google Authenticator / Aegis + QR Code | | 📡 | **Test de connexion** | VĂ©rification UDP du serveur avant Ă©tablissement du tunnel | | đŸȘŸđŸ§ | **Cross-platform** | Windows 10+ et Linux (wg-quick) | --- ## 📋 PrĂ©requis ### 🐧 Linux ```bash sudo apt install wireguard-tools # Debian/Ubuntu sudo dnf install wireguard-tools # Fedora ``` ### đŸȘŸ Windows - [WireGuard for Windows](https://www.wireguard.com/install/) installĂ© ### 🐍 Python ``` Python >= 3.11 ``` --- ## 📩 Installation ```bash git clone cd WGSecure pip install -r requirements.txt ``` --- ## 🚀 Utilisation ### Mode User (par dĂ©faut) ```bash python main.py ``` ### ⚙ Mode Administrateur (configuration) ```bash python main.py --admin ``` ### Sans systray ```bash python main.py --no-tray ``` --- ## đŸ—ș Workflow recommandĂ© 1. 🚀 Lancer `python main.py --admin` 2. đŸ›Ąïž Onglet **WireGuard** : renseigner l'adresse, le port et la clĂ© publique du serveur 3. 🔑 Onglet **ClĂ©s** : gĂ©nĂ©rer une paire de clĂ©s → copier la clĂ© publique sur le serveur 4. 🔐 Onglet **MFA** : activer le MFA, gĂ©nĂ©rer un secret, scanner le QR Code 5. 🔒 Onglet **SĂ©curitĂ©** : dĂ©finir un mot de passe pour l'accĂšs admin 6. ✅ **Enregistrer** → quitter → lancer `python main.py` en mode user --- ## đŸ—ïž Architecture ``` WGSecure/ ├── main.py # 🚀 Point d'entrĂ©e ├── requirements.txt ├── app/ │ ├── __init__.py # Version │ ├── core/ │ │ ├── config.py # đŸ’Ÿ Configuration JSON persistante │ │ ├── wireguard.py # đŸ›Ąïž ClĂ©s, tunnel, statut │ │ └── mfa.py # 🔐 TOTP / QR Code │ ├── ui/ │ │ ├── icons.py # 🎹 IcĂŽnes bouclier gĂ©nĂ©rĂ©es par QPainter │ │ ├── main_window.py # đŸ‘€ FenĂȘtre principale (mode user) │ │ ├── admin_window.py # ⚙ Panneau admin (6 onglets, thĂšme sombre) │ │ ├── mfa_dialog.py # 🔐 Dialog de vĂ©rification MFA │ │ └── systray.py # đŸ–„ïž IcĂŽne systray + menu contextuel │ └── utils/ │ └── platform_utils.py # 🔧 DĂ©tection OS, Ă©lĂ©vation de privilĂšges ``` --- ## 🔒 SĂ©curitĂ© | ÉlĂ©ment | Protection | |---|---| | 🔑 Mot de passe admin | Hash SHA-256 + salt alĂ©atoire 16 octets | | đŸ—ïž ClĂ© privĂ©e WireGuard | `~/.wgsecure/config.json` (Linux) / `%APPDATA%\WGSecure\` (Windows) | | 🔐 Secret MFA TOTP | StockĂ© dans le fichier de configuration local | | 📄 Fichier `.conf` WireGuard | Permissions `0600` (lecture propriĂ©taire uniquement) | > ⚠ **Recommandation** : chiffrez votre disque pour protĂ©ger le fichier de configuration. --- ## đŸ–Œïž Interface | FenĂȘtre principale | Panneau Admin | |---|---| | Statut connexion en temps rĂ©el | 6 onglets thĂšme sombre | | Bouton connexion / dĂ©connexion | WireGuard · ClĂ©s · MFA · Test · SĂ©curitĂ© · À propos | | IcĂŽne systray bouclier colorĂ©e | Bandeau colorĂ© par onglet | --- ## đŸ‘€ Auteur DĂ©veloppĂ© par **Johnny** — [JT-Tools](https://github.com/JT-Tools) Version : ![v0.4.0](https://img.shields.io/badge/v0.4.0-juin%202026-2980b9?style=flat-square) — Juin 2026