This commit is contained in:
iTakinn
2025-10-12 18:05:12 -03:00
parent cbf771ab23
commit aa337f9b29
4 changed files with 429 additions and 61 deletions
+13 -10
View File
@@ -12,36 +12,34 @@ WHMCS module for integration with [WGDashboard](https://github.com/donaldzou/WGD
## 🚀 Installation
1. Upload the module files to the WHMCS directory:
```
/modules/servers/wgdashboard/
```
2. File structure:
```
modules/server/wgdashboard/
├── wgdashboard.php
└── clientarea.tpl
```
3. In the WHMCS admin panel, navigate to:
**Setup → Products/Services → Servers → Add New Server**
4. Configure the server:
- **Hostname**: IP or domain of WGDashboard (e.g., `10.0.238.222` or `vpn.example.com`)
- **Module**: WGDashboard
- **Port**: API port (e.g., `10086`)
- **Password**: WGDashboard API Key
5. Click **Test Connection** to validate the configuration.
## ⚙️ Product Configuration
1. Create or edit a product in **Setup → Products/Services**
2. In the **Module Settings** tab:
- **Module Name**: WGDashboard
- **Server Group**: Select the configured server
3. **Configuration Options**:
- **Allowed IPs**: Allowed IPs for the peer (default: `0.0.0.0/0`)
@@ -59,6 +57,7 @@ WHMCS module for integration with [WGDashboard](https://github.com/donaldzou/WGD
```
Available placeholders:
- `{{client_email}}` - Client's email
- `{{domain}}` - Service domain
- `{{serviceid}}` - Service ID in WHMCS
@@ -82,7 +81,6 @@ Client Area:
- 📄 **Formatted Configuration**: Ready-to-use WireGuard configuration file
- 📋 **Download**: Button to download `.conf` file
### Admin Panel
In the client's service tab, the administrator views:
@@ -95,7 +93,6 @@ In the client's service tab, the administrator views:
- **Data Received**: Volume of data received From peer to server
- **Data Sent**: Volume of data sent From server to peer
## 🌐 WGDashboard Configuration
To use this module, ensure the WGDashboard API is enabled:
@@ -110,16 +107,19 @@ To use this module, ensure the WGDashboard API is enabled:
### Connection Test Fails
**Error 401/403**: Verify API Key
```
Solution: Confirm that the API Key is correct in the server's Password field
```
**Error 404**: Endpoint not found
```
Solution: Check if your WGDashboard version supports the API
```
**Error 500**: WGDashboard internal error
```
Solution: Check WGDashboard logs on the server
```
@@ -134,6 +134,7 @@ Solution: Check WGDashboard logs on the server
### QR Code Doesn't Appear
Check:
- If JavaScript is enabled in the browser
- Browser console for errors (F12)
- If QRCode.js library is loading correctly
@@ -144,14 +145,15 @@ The module uses WHMCS's **Server Port** field to define the API port.
Do not include the port in the hostname, only in the dedicated field.
✅ **Correct**:
- Hostname: `10.0.0.55`
- Port: `10086`
❌ **Incorrect**:
- Hostname: `10.0.0.55:10086`
- Port: (empty)
## 🔄 Compatibility
- **WHMCS**: 7.0+
@@ -182,6 +184,7 @@ Contributions are welcome! To contribute:
## 📋 Changelog
### v1.0.0
- ✨ Initial release
- ✅ Peer creation, suspension, reactivation, and termination
- 📱 Client area with QR code and formatted configuration
@@ -189,4 +192,4 @@ Contributions are welcome! To contribute:
- 🔐 Local WireGuard key generation
- 📊 Admin panel with peer statistics
---
---