- Python 89.3%
- Shell 9.4%
- Dockerfile 1.3%
| .gitignore | ||
| app.py | ||
| Dockerfile | ||
| install.sh | ||
| LICENSE | ||
| README.md | ||
MikroWG - WireGuard API Agent
MikroWizard WireGuard Addon is a lightweight, secure, and fast WireGuard management agent designed for the MikroWizard ecosystem. It provides a RESTful API to manage VPN interfaces, peer connectivity, and real-time bandwidth monitoring.
🚀 Quick Install
To install MikroWizard WireGuard Addon on a server already running MikroWizard:
sudo bash -c "$(curl -sSL https://raw.githubusercontent.com/MikroWizard/MikroWizard_wireguard/refs/heads/master/install.sh)"
This script will:
- Pull the official
mikrowizard/wireguard-addon:latestimage. - Prompt for basic VPN configuration (Port, Subnet, MTU, etc.).
- Configure the local WireGuard kernel module.
- Auto-integrate with your existing MikroWizard
/opt/mikrowizard/server-conf.json.
🛠️ Key Features
- Real-time Monitoring: Instant RX/TX speed tracking for the server and individual peers.
- Security First: Hardened iptables defaults, including MSS Clamping for MTU stability.
- Zero-Config Peers: Automatic generation of client configs and QR Codes for mobile devices.
- NAT Management: Intelligent SNAT/MASQUERADE handling for split and full tunnel modes.
- Dockerized: Isolated environment with minimal host dependencies.
📖 API Usage
The agent listens on 127.0.0.1:8000 (host-only for security). All requests require a Bearer token.
Authentication
Include the following header:
Authorization: Bearer <YOUR_ADDON_TOKEN>
Common Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Verify agent and interface status |
GET |
/status |
Get detailed peer transfer stats |
GET |
/status/live |
Real-time bandwidth speeds (JSON) |
POST |
/peer/add |
Create/Update a new WireGuard peer |
GET |
/peer/{pubkey}/qrcode |
Generate a mobile-ready QR code |
🔒 Security
For optimal security, this agent binds to the host's loopback interface (127.0.0.1). It is intended to be accessed by a local process or a reverse proxy.
📜 License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.
Developed by Sepehr Hashtroudilar MikroWizard