Update README.md

This commit is contained in:
ArkHost
2025-06-14 00:17:24 +02:00
committed by GitHub
parent a2da79aa71
commit 9fee13cc7d
+65 -189
View File
@@ -1,221 +1,97 @@
# ArkHost VPSAG - WHMCS Server Module # ArkHost VPSAG WHMCS Module
A comprehensive WHMCS server module for integrating with the VPSAG VPS hosting platform. This module provides full automation for VPS provisioning, management, and client area functionality. WHMCS server module for VPSAG VPS platform integration.
![Version](https://img.shields.io/badge/version-1.3-blue.svg) ## Requirements
![WHMCS](https://img.shields.io/badge/WHMCS-8.0+-green.svg)
![PHP](https://img.shields.io/badge/PHP-7.4+-blue.svg)
![License](https://img.shields.io/badge/license-Proprietary-red.svg)
## 🚀 Features - WHMCS 8.0+
- PHP 7.4+
- cURL extension
- VPSAG API credentials
### ✅ Core VPS Management ## Installation
- **Automated Provisioning** - Instant VPS creation with plan and OS selection
- **Account Suspension/Unsuspension** - Complete account lifecycle management
- **Account Termination** - Clean removal with data cleanup
- **Package Upgrades** - Seamless plan changes and resource scaling
### ✅ Client Area Features 1. Extract to `/path/to/whmcs/modules/servers/ArkhostVPSAG/`
- **Real-time Server Information** - CPU, RAM, Disk, and Bandwidth monitoring 2. Set permissions: `chmod -R 755 modules/servers/ArkhostVPSAG/`
- **Power Management** - Start, Stop, Reboot controls 3. In WHMCS admin: Setup → Products/Services → Servers
- **VNC Console Access** - Direct browser-based console access 4. Add server:
- **Performance Graphs** - Historical usage charts (hourly, daily, weekly, monthly, yearly) - Type: ArkhostVPSAG
- Hostname: VPSAG API endpoint
- Username: API username
- Password: API key
### ✅ Advanced Management ## Configuration
- **Backup Management** - Create, restore, and delete backups
- **Firewall Configuration** - Manage firewall rules and policies
- **ISO Management** - Mount and eject ISO images
- **Hostname & rDNS** - Configure hostnames and reverse DNS
- **OS Reinstallation** - Fresh OS installation with multiple OS options
- **Root Password Reset** - Secure password reset functionality
### ✅ Admin Features - Create server with ArkhostVPSAG module type
- **Balance & Discount Display** - Real-time account balance and discount information - Enter VPSAG API credentials
- **Connection Testing** - Validate API credentials and connectivity - Test connection
- **Comprehensive Logging** - Full API call logging for debugging
- **Multi-language Support** - Localized interface
## 📋 Requirements - Create product
- Select module: ArkhostVPSAG
- Set plan ID and OS ID
- **WHMCS** 8.0 or higher Configurable options:
- **PHP** 7.4 or higher - `planid` - VPSAG plan identifier
- **cURL** extension enabled - `osid` - Operating system identifier
- **Valid VPSAG API credentials**
## 📦 Installation ## File Structure
1. **Download the module files** and extract to your WHMCS directory:
```
/path/to/whmcs/modules/servers/ArkhostVPSAG/
```
2. **Ensure proper file permissions**:
```bash
chmod -R 755 modules/servers/ArkhostVPSAG/
```
3. **Log into WHMCS Admin Area** and navigate to:
```
Setup → Products/Services → Servers
```
4. **Add a new server** with the following details:
- **Server Type**: ArkhostVPSAG
- **Hostname**: VPSAG API endpoint
- **Username**: Your VPSAG API username
- **Password**: Your VPSAG API key
## ⚙️ Configuration
### Server Setup
1. **Create a Server Group** (optional but recommended)
2. **Add Server** with VPSAG credentials
3. **Test Connection** to verify API access
### Product Configuration
1. **Create a new product** in WHMCS
2. **Select Module**: ArkhostVPSAG
3. **Configure Module Settings**:
- **Plan**: Select from available VPSAG plans
- **Operating System**: Choose default OS or allow client selection
### Configurable Options
The module supports two main configurable options:
- **`planid`** - VPSAG plan identifier
- **`osid`** - Operating system identifier
## 🏗️ File Structure
```
1111
/modules/servers/ArkhostVPSAG/ /modules/servers/ArkhostVPSAG/
├── ArkhostVPSAG.php # Main module file ├── ArkhostVPSAG.php
├── callback.php # Webhook handler ├── callback.php
├── README.md # This file ├── README.md
├── lang/ # Language files ├── lang/
── english.php ── english.php
│ └── [other languages] └── template/
└── template/ # Client area templates ├── clientarea_direct.tpl
├── clientarea_direct.tpl # Main client template ├── error.tpl
├── error.tpl # Error template
├── css/ ├── css/
│ └── app.min.css # Styles
├── js/ ├── js/
└── app.min.js # JavaScript └── img/
└── img/ # Images and icons 1111
├── os/ # OS icons
└── [status icons]
```
## 🔌 API Integration ## API Integration
The module integrates with VPSAG API v1 endpoints: Base URL: `https://www.vpsag.com/api/v1/`
### Authentication
```php
Headers: Headers:
X_API_USER: [username] X_API_USER: [username]
X_API_KEY: [api_key] X_API_KEY: [api_key]
```
### Base URL
```
https://www.vpsag.com/api/v1/
```
### Key Endpoints Used Endpoints:
- `GET /plans` - Retrieve available plans - `GET /plans`
- `POST /order/plan` - Create new VPS - `POST /order/plan`
- `GET /vps/{id}` - Get server information - `GET /vps/{id}`
- `POST /vps/{id}/action/{action}` - Power management - `POST /vps/{id}/action/{action}`
- `GET /vps/{id}/graph/{period}` - Performance graphs - `GET /vps/{id}/graph/{period}`
- `POST /vps/{id}/backup` - Backup management - `POST /vps/{id}/backup`
- `POST /vps/{id}/firewall` - Firewall management - `POST /vps/{id}/firewall`
## 🎛️ Client Area Functionality ## Webhook
The module provides a comprehensive client area interface with: VPSAG webhook URL:
`https://yourdomain.com/modules/servers/ArkhostVPSAG/callback.php`
### Navigation Tabs Handles:
- **Overview** - Server status and resource usage - VPS provisioning completion
- **Graphs** - Performance monitoring charts - IP assignment
- **Backups** - Backup management interface - Service activation
- **Settings** - Server configuration options
### Settings Sections ## Troubleshooting
- **Hostname** - Configure server hostname and rDNS
- **ISO Management** - Mount/unmount ISO images
- **Password Reset** - Reset root password
- **Reinstall** - Complete OS reinstallation
- **Firewall** - Manage firewall rules
## 🔧 Webhook Configuration Enable module logging: Utilities → Logs → Module Log
The module includes a webhook handler (`callback.php`) for processing VPSAG notifications: Common issues:
- Connection failed: Check API credentials and connectivity
- VPS not found: Verify VPS ID in service properties
- Client area not loading: Check file permissions and PHP logs
1. **Configure in VPSAG** panel to point to: ## Support
```
https://yourdomain.com/modules/servers/ArkhostVPSAG/callback.php
```
2. **Webhook handles**: support@arkhost.com
- VPS provisioning completion
- IP address assignment
- Service activation notifications
## 🐛 Troubleshooting ## License
### Common Issues Proprietary. Copyright © 2024 ArkHost.
**Connection Failed**
- Verify API credentials are correct
- Check server can reach VPSAG API endpoints
- Ensure cURL is enabled and functional
**VPS Not Found**
- Check if VPS ID is properly stored in service properties
- Verify VPS exists in VPSAG panel
- Check service custom fields for VPSAG ID
**Client Area Not Loading**
- Verify template files have correct permissions
- Check for PHP errors in WHMCS logs
- Ensure all required files are uploaded
### Debug Mode
Enable WHMCS module logging to troubleshoot API issues:
1. Go to **Utilities → Logs → Module Log**
2. All API calls and responses are logged for debugging
## 📝 Changelog
### Version 1.3
- Fixed CPU usage display underreporting issue
- Removed duplicate API cases and dead code
- Improved error handling and logging
- Enhanced client area interface
- Added comprehensive backup management
- Implemented firewall configuration
## 🆘 Support
For technical support and module-related queries:
- **Email**: support@arkhost.com
- **Website**: https://arkhost.com
- **Documentation**: Check WHMCS module logs for detailed error information
## 📄 License
This module is proprietary software owned by ArkHost. All rights reserved.
**Copyright © 2024 ArkHost**
---
*For the latest updates and documentation, visit our website at https://arkhost.com*