Enhance CyberPanel with new features and improvements, including a file integrity verification system, IP blocking functionality, and support for resetting Apache and vHost configurations to default. Update documentation and guides for better user experience. Fix bandwidth reset issues and improve overall system stability.

This commit is contained in:
Master3395
2025-09-18 20:45:34 +02:00
parent 5651775b58
commit bb4f8a9f58
23 changed files with 2045 additions and 367 deletions

View File

@@ -1,81 +0,0 @@
@echo off
REM Test script for Ubuntu 24.04.3 support in CyberPanel
REM This script verifies that CyberPanel properly detects and handles Ubuntu 24.04.3
echo CyberPanel Ubuntu 24.04.3 Support Test
echo ======================================
echo.
REM Check if running on Ubuntu 24.04.3
if exist /etc/os-release (
echo Detected OS: Checking /etc/os-release
findstr "Ubuntu" /etc/os-release
echo.
echo ✅ Ubuntu 24.04.3 support verified
) else (
echo ❌ Cannot detect OS version
echo This test is designed for Ubuntu 24.04.3
echo Current system: Windows
echo Continuing with compatibility test...
)
echo.
REM Test 1: Version detection
echo Test 1: Version Detection
echo -------------------------
if exist /etc/os-release (
findstr "Ubuntu 24.04" /etc/os-release >nul
if %errorlevel% == 0 (
echo ✅ Ubuntu 24.04 pattern match successful
) else (
echo ❌ Ubuntu 24.04 pattern match failed
)
) else (
echo ⚠️ /etc/os-release not found (Windows system)
)
echo.
REM Test 2: CyberPanel installation check
echo Test 2: CyberPanel Installation Check
echo -------------------------------------
if exist "C:\Program Files\CyberPanel\bin\python.exe" (
echo ✅ CyberPanel installation found
) else (
echo ⚠️ CyberPanel not installed - this is normal for Windows
)
echo.
REM Test 3: System requirements
echo Test 3: System Requirements
echo ---------------------------
echo Architecture: %PROCESSOR_ARCHITECTURE%
echo OS: %OS%
echo.
REM Test 4: Network connectivity
echo Test 4: Network Connectivity
echo ----------------------------
ping -n 1 8.8.8.8 >nul 2>&1
if %errorlevel% == 0 (
echo ✅ Network connectivity working
) else (
echo ❌ Network connectivity issues
)
echo.
echo Ubuntu 24.04.3 Support Test Complete
echo ====================================
echo.
echo Summary:
echo - Ubuntu 24.04.3 is fully supported by CyberPanel
echo - Version detection works correctly
echo - All required packages and dependencies are available
echo - Installation and upgrade scripts are compatible
echo.
echo For installation on Ubuntu 24.04.3, run:
echo sh ^<(curl https://cyberpanel.net/install.sh ^|^| wget -O - https://cyberpanel.net/install.sh^)
echo.
pause

View File

@@ -1,168 +0,0 @@
#!/bin/bash
# Test script for Ubuntu 24.04.3 support in CyberPanel
# This script verifies that CyberPanel properly detects and handles Ubuntu 24.04.3
echo "CyberPanel Ubuntu 24.04.3 Support Test"
echo "======================================"
echo ""
# Check if running on Ubuntu 24.04.3
if [ -f /etc/os-release ]; then
source /etc/os-release
echo "Detected OS: $NAME $VERSION"
if [[ "$NAME" == "Ubuntu" ]] && [[ "$VERSION" == *"24.04.3"* ]]; then
echo "✅ Ubuntu 24.04.3 detected"
else
echo "⚠️ This test is designed for Ubuntu 24.04.3"
echo " Current system: $NAME $VERSION"
echo " Continuing with compatibility test..."
fi
else
echo "❌ Cannot detect OS version"
exit 1
fi
echo ""
# Test 1: Version detection
echo "Test 1: Version Detection"
echo "-------------------------"
if grep -q -E "Ubuntu 24.04" /etc/os-release; then
echo "✅ Ubuntu 24.04 pattern match successful"
else
echo "❌ Ubuntu 24.04 pattern match failed"
fi
# Test 2: Version parsing
echo ""
echo "Test 2: Version Parsing"
echo "-----------------------"
VERSION_ID=$(grep VERSION_ID /etc/os-release | awk -F[=,] '{print $2}' | tr -d \" | head -c2 | tr -d .)
echo "Parsed version: $VERSION_ID"
if [ "$VERSION_ID" = "24" ]; then
echo "✅ Version parsing correct (24)"
else
echo "❌ Version parsing incorrect (expected: 24, got: $VERSION_ID)"
fi
# Test 3: Python version detection
echo ""
echo "Test 3: Python Version Detection"
echo "--------------------------------"
if command -v python3 &> /dev/null; then
PYTHON_VERSION=$(python3 --version | cut -d' ' -f2 | cut -d'.' -f1-2)
echo "Python version: $PYTHON_VERSION"
if [[ "$PYTHON_VERSION" == "3.12" ]]; then
echo "✅ Python 3.12 detected (expected for Ubuntu 24.04.3)"
else
echo "⚠️ Python version $PYTHON_VERSION (Ubuntu 24.04.3 typically has Python 3.12)"
fi
else
echo "❌ Python3 not found"
fi
# Test 4: Package manager compatibility
echo ""
echo "Test 4: Package Manager Compatibility"
echo "------------------------------------"
if command -v apt &> /dev/null; then
echo "✅ APT package manager available"
# Test if we can access Ubuntu repositories
if apt list --installed | grep -q "ubuntu-release"; then
echo "✅ Ubuntu release packages found"
else
echo "⚠️ Ubuntu release packages not found"
fi
else
echo "❌ APT package manager not found"
fi
# Test 5: Virtual environment support
echo ""
echo "Test 5: Virtual Environment Support"
echo "-----------------------------------"
if command -v python3 -m venv --help &> /dev/null; then
echo "✅ Python3 venv module available"
# Test creating a virtual environment
TEST_VENV="/tmp/cyberpanel_test_venv"
if python3 -m venv "$TEST_VENV" 2>/dev/null; then
echo "✅ Virtual environment creation successful"
rm -rf "$TEST_VENV"
else
echo "❌ Virtual environment creation failed"
fi
else
echo "❌ Python3 venv module not available"
fi
# Test 6: CyberPanel version detection
echo ""
echo "Test 6: CyberPanel Version Detection"
echo "------------------------------------"
if [ -f /usr/local/CyberCP/plogical/upgrade.py ]; then
echo "✅ CyberPanel installation found"
# Test if the version detection would work
if python3 -c "
import sys
sys.path.append('/usr/local/CyberCP')
try:
from plogical.upgrade import Upgrade
os_type = Upgrade.FindOperatingSytem()
print(f'Detected OS type: {os_type}')
if os_type == 9: # Ubuntu24 constant
print('✅ Ubuntu 24.04 detection working')
else:
print(f'⚠️ OS type {os_type} detected (expected: 9 for Ubuntu24)')
except Exception as e:
print(f'❌ Error testing OS detection: {e}')
" 2>/dev/null; then
echo "✅ CyberPanel OS detection test completed"
else
echo "❌ CyberPanel OS detection test failed"
fi
else
echo "⚠️ CyberPanel not installed - skipping detection test"
fi
# Test 7: System requirements
echo ""
echo "Test 7: System Requirements"
echo "---------------------------"
echo "Architecture: $(uname -m)"
if uname -m | grep -qE 'x86_64|aarch64'; then
echo "✅ Supported architecture detected"
else
echo "❌ Unsupported architecture"
fi
echo ""
echo "Memory: $(free -h | grep '^Mem:' | awk '{print $2}')"
echo "Disk space: $(df -h / | tail -1 | awk '{print $4}') available"
# Test 8: Network connectivity
echo ""
echo "Test 8: Network Connectivity"
echo "----------------------------"
if ping -c 1 8.8.8.8 &> /dev/null; then
echo "✅ Network connectivity working"
else
echo "❌ Network connectivity issues"
fi
echo ""
echo "Ubuntu 24.04.3 Support Test Complete"
echo "===================================="
echo ""
echo "Summary:"
echo "- Ubuntu 24.04.3 is fully supported by CyberPanel"
echo "- Version detection works correctly"
echo "- All required packages and dependencies are available"
echo "- Installation and upgrade scripts are compatible"
echo ""
echo "For installation, run:"
echo "sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)"