🚀 Sauron-Pro Fleet Management System
📋 Overview
The Fleet Management System allows you to deploy and control multiple Sauron-Pro instances across different VPS servers from a centralized master controller. This creates a distributed MITM network that can be managed from a single admin interface.
Key Benefits:
Centralized control of multiple VPS instances
Automated registration and heartbeat monitoring
Remote command execution across the fleet
Real-time status monitoring and alerts
Scalable architecture (100+ VPS support)
🏗️ Architecture
Master Controller (master.example.com:8443)
├── Fleet Management API
├── VPS Registration & Heartbeat
├── Command Dispatch System
└── Centralized Monitoring
Connected VPS Instances
├── VPS-001 (vps1.example.com)
├── VPS-002 (vps2.example.com)
├── VPS-003 (vps3.example.com)
└── ... (up to 100+ VPS instances)
🏛️ Master Controller
Location: Single server (e.g., master.example.com)
Purpose: Central command and control
Features:
VPS registration & heartbeat monitoring
Command dispatch to VPS instances
Fleet-wide statistics
Script execution management
Real-time status dashboard
🖥️ VPS Agents
Location: Each individual VPS server
Purpose: Local MITM operations + master communication
Features:
Automatic registration with master
Periodic heartbeat (every 5 minutes)
Command receiver for remote operations
Local credential capture
Script execution via master commands
⚙️ Installation
🎯 Deployment Workflow
Step 1: Deploy Master Controller
export DOMAIN=master.example.com
sudo ./scripts/deploy-fleet-master.sh
Step 2: Deploy VPS Agents (on each VPS)
export MASTER_URL=https://master.example.com:8443
export VPS_ID=vps-001
export VPS_DOMAIN=vps1.example.com
sudo ./scripts/deploy-vps-agent.sh
Step 3: Verify Fleet
/opt/sauron-pro/bin/fleet-status
/opt/sauron-pro/bin/fleet-command vps-001 status
📋 Prerequisites
Master Controller Requirements:
Linux server with root access
Go 1.19+ installed
Domain pointing to server
SSL certificate configured
VPS Agent Requirements:
Linux VPS with root access
Go 1.19+ installed
Network connectivity to master controller
🎮 Usage
Fleet Management Commands
# View all VPS instances
/opt/sauron-pro/bin/fleet-status
# Send command to specific VPS
/opt/sauron-pro/bin/fleet-command <vps-id> <command> [payload]
Available Commands
Command Description Example
status Get VPS status and statistics fleet-command vps-001 status
restart Restart VPS service fleet-command vps-001 restart
script Execute script on VPS fleet-command vps-001 script '{"script": "update.sh"}'
config Update VPS configuration fleet-command vps-001 config
update Update VPS software fleet-command vps-001 update
🔌 API Reference
Master Controller APIs
POST /fleet/register
Content-Type: application/json
X-VPS-ID: vps-001
{
"ip": "192.168.1.100",
"domain": "vps-001.example.com",
"admin_domain": "admin.vps-001.example.com",
"version": "v2.0.1",
"location": "US-East"
}
GET /fleet/instances
Response:
{
"success": true,
"instances": [
{
"id": "vps-001",
"ip": "192.168.1.100",
"domain": "vps-001.example.com",
"status": "active",
"last_seen": "2025-08-17T10:30:00Z",
"location": "US-East",
"version": "v2.0.1"
}
],
"fleet_stats": {
"total_vps": 5,
"active_vps": 4
}
}
POST /fleet/command
Content-Type: application/json
{
"vps_id": "vps-001",
"command": "status",
"payload": {}
}
⚙️ Configuration
Master Controller Configuration
Location: /etc/sauron-pro/fleet-config.json
{
"fleet_master": {
"domain": "master.example.com",
"port": 8443,
"max_vps_instances": 100,
"heartbeat_timeout": 600,
"command_timeout": 30,
"database": {
"path": "/opt/sauron-pro/data/fleet.db",
"backup_interval": 3600
},
"security": {
"require_vps_auth": true,
"max_command_rate": 10,
"allowed_commands": ["status", "restart", "script", "config", "update"]
}
}
}
VPS Agent Configuration
Location: /etc/sauron-pro/vps-config.json
{
"vps_agent": {
"id": "vps-001",
"domain": "vps-001.example.com",
"location": "US-East",
"master_url": "https://master.example.com:8443",
"heartbeat_interval": 300,
"command_port": 8444,
"security": {
"enable_auth": true,
"max_command_rate": 5
}
}
}
📊 Monitoring & Maintenance
Log Locations
Component Service Logs Error Logs System Logs
Master Controller
/var/log/sauron-pro/fleet-master.log
/var/log/sauron-pro/fleet-master-error.log
journalctl -u sauron-fleet-master
VPS Agent
/var/log/sauron-pro/vps-agent.log
/var/log/sauron-pro/vps-agent-error.log
journalctl -u sauron-vps-agent
Health Monitoring
# View all VPS instances and their status
curl -s https://master.example.com:8443/fleet/instances | jq '.'
# Check specific VPS
curl -s https://master.example.com:8443/fleet/instances | jq '.instances[] | select(.id=="vps-001")'
Heartbeat System:
VPS instances send heartbeat every 5 minutes
Master marks VPS as inactive after 10 minutes without heartbeat
Automatic alerts when VPS goes offline
💡 Examples
Execute Script on Specific VPS
/opt/sauron-pro/bin/fleet-command vps-001 script '{"script": "update-sauron-template.sh"}'
Execute Script on All Active VPS
# Get all active VPS IDs
VPS_LIST=$(curl -s https://master.example.com:8443/fleet/instances | jq -r '.instances[] | select(.status=="active") | .id')
# Execute script on each
for vps in $VPS_LIST; do
/opt/sauron-pro/bin/fleet-command $vps script '{"script": "cleanup-logs.sh"}'
done
Best Practices
VPS Naming Convention: Use descriptive IDs (us-east-001, eu-west-002)
Regular Monitoring: Check fleet status daily
Staged Deployments: Test commands on single VPS before fleet-wide
Backup Strategy: Regular database backups on master controller
Security Updates: Keep all instances updated
Geographic Distribution: Spread VPS across different regions
Capacity Planning: Monitor resource usage and scale appropriately
🔧 Troubleshooting
VPS Not Registering
Check network connectivity to master controller
Verify MASTER_URL configuration
Check firewall rules (port 8443)
Review VPS agent logs
Commands Not Executing
Verify VPS is active and responsive
Check command syntax and payload
Review VPS agent command receiver logs
Ensure command is in allowed commands list
Performance Issues
Monitor heartbeat intervals
Check database performance on master
Review resource usage on VPS instances
Consider scaling master controller
Sauron-Pro Fleet Management System Documentation
For support and updates, review the troubleshooting section and log files.