From f061da654d0e7d9df195472b98946c1284f214c3 Mon Sep 17 00:00:00 2001 From: Johnny Date: Mon, 1 Jun 2026 22:35:37 +0200 Subject: [PATCH] fix --- README.md | 112 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 8a99c46..d53270f 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,51 @@ -# WGSecure (WGS) +# đŸ›Ąïž WGSecure (WGS) + +![Version](https://img.shields.io/badge/version-0.1.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Ă©s -| FonctionnalitĂ© | DĂ©tail | -|---|---| -| **Interface systray** | IcĂŽne dans la barre de notification, connexion en un clic | -| **Mode User** (dĂ©faut) | Connexion / dĂ©connexion WireGuard, statut en temps rĂ©el | -| **Mode Admin** | Configuration complĂšte (mot de passe protĂ©gĂ©) | -| **GĂ©nĂ©ration de clĂ©s** | Paire clĂ© privĂ©e / publique Curve25519 (format WireGuard) | -| **Configuration WireGuard** | Serveur, port UDP, DNS, IP client, keepalive | -| **MFA TOTP** | Surcouche d'authentification compatible Google Authenticator / Aegis | -| **Test de connexion** | VĂ©rification UDP du serveur avant connexion | -| **Cross-platform** | Windows 10+ et Linux (wg-quick) | +| # | 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 +## 📋 PrĂ©requis -### Linux +### 🐧 Linux ```bash sudo apt install wireguard-tools # Debian/Ubuntu sudo dnf install wireguard-tools # Fedora ``` -### Windows +### đŸȘŸ Windows - [WireGuard for Windows](https://www.wireguard.com/install/) installĂ© -### Python +### 🐍 Python ``` Python >= 3.11 ``` --- -## Installation +## 📩 Installation ```bash git clone @@ -47,14 +55,14 @@ pip install -r requirements.txt --- -## Utilisation +## 🚀 Utilisation ### Mode User (par dĂ©faut) ```bash python main.py ``` -### Mode Administrateur (configuration) +### ⚙ Mode Administrateur (configuration) ```bash python main.py --admin ``` @@ -66,53 +74,65 @@ python main.py --no-tray --- -## Workflow recommandĂ© +## đŸ—ș Workflow recommandĂ© -1. Lancer `python main.py --admin` -2. Onglet **WireGuard** : renseigner l'adresse et le port du serveur, la clĂ© publique du serveur -3. Onglet **ClĂ©s** : gĂ©nĂ©rer une paire de clĂ©s client → copier la clĂ© publique sur le serveur -4. Onglet **MFA** : activer le MFA, gĂ©nĂ©rer un secret, scanner le QR Code avec Aegis/Google Authenticator -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 +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 +## đŸ—ïž Architecture ``` WGSecure/ -├── main.py # Point d'entrĂ©e +├── 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 +│ │ ├── config.py # đŸ’Ÿ Configuration JSON persistante +│ │ ├── wireguard.py # đŸ›Ąïž ClĂ©s, tunnel, statut +│ │ └── mfa.py # 🔐 TOTP / QR Code │ ├── ui/ -│ │ ├── icons.py # IcĂŽnes gĂ©nĂ©rĂ©es par QPainter -│ │ ├── main_window.py # FenĂȘtre principale (mode user) -│ │ ├── admin_window.py # Panneau admin (5 onglets) -│ │ ├── mfa_dialog.py # Dialog de vĂ©rification MFA -│ │ └── systray.py # IcĂŽne systray + menu contextuel +│ │ ├── 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 +│ └── platform_utils.py # 🔧 DĂ©tection OS, Ă©lĂ©vation de privilĂšges ``` --- -## SĂ©curitĂ© +## 🔒 SĂ©curitĂ© -- Le mot de passe administrateur est stockĂ© sous forme de hash SHA-256 salĂ© (salt alĂ©atoire 16 octets) -- La clĂ© privĂ©e WireGuard est stockĂ©e localement dans `~/.wgsecure/config.json` (Linux) ou `%APPDATA%\WGSecure\config.json` (Windows) -- Le secret MFA TOTP est stockĂ© dans le mĂȘme fichier de configuration -- Le fichier de config WireGuard gĂ©nĂ©rĂ© est protĂ©gĂ© avec les permissions `0600` +| É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. +> ⚠ **Recommandation** : chiffrez votre disque pour protĂ©ger le fichier de configuration. --- -## Auteur +## đŸ–Œïž Interface -DĂ©veloppĂ© par **Johnny** — JT-Tools -Version : **0.1.0** — Juin 2026 +| 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.1.0](https://img.shields.io/badge/v0.1.0-juin%202026-2980b9?style=flat-square) — Juin 2026