mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-07 06:26:05 +02:00
Merge v2.4.4 updates: OLS v2.4.4 binaries, module config, Auto-SSL injection, OLS test suite
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
|
||||
# Ensure install dir is on path for ols_binaries_config
|
||||
_install_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
if _install_dir not in sys.path:
|
||||
sys.path.insert(0, _install_dir)
|
||||
import ols_binaries_config
|
||||
|
||||
import subprocess
|
||||
import shutil
|
||||
import installLog as logging
|
||||
import argparse
|
||||
import os
|
||||
import errno
|
||||
import shlex
|
||||
from firewallUtilities import FirewallUtilities
|
||||
@@ -1176,30 +1184,7 @@ class preFlightsChecks:
|
||||
platform = self.detectPlatform()
|
||||
self.stdOut(f"Detected platform: {platform}", 1)
|
||||
|
||||
# Platform-specific URLs and checksums (OpenLiteSpeed 1.8.5+ preferred from repo; fallback static build)
|
||||
# Module Build Date: December 28, 2025 - v2.2.0 Brute Force with Progressive Throttle
|
||||
BINARY_CONFIGS = {
|
||||
'rhel8': {
|
||||
'url': 'https://cyberpanel.net/openlitespeed-phpconfig-x86_64-rhel8-static',
|
||||
'sha256': '6ce688a237615102cc1603ee1999b3cede0ff3482d31e1f65705e92396d34b3a',
|
||||
'module_url': 'https://cyberpanel.net/binaries/rhel8/cyberpanel_ols.so',
|
||||
'module_sha256': '7c33d89c7fbcd3ed7b0422fee3f49b5e041713c2c2b7316a5774f6defa147572'
|
||||
},
|
||||
'rhel9': {
|
||||
'url': 'https://cyberpanel.net/openlitespeed-phpconfig-x86_64-rhel9-static',
|
||||
'sha256': '709093d99d5d3e789134c131893614968e17eefd9ade2200f811d9b076b2f02e',
|
||||
'module_url': 'https://cyberpanel.net/binaries/rhel9/cyberpanel_ols.so',
|
||||
'module_sha256': 'ae65337e2d13babc0c675bb4264d469daffa2efb7627c9bf39ac59e42e3ebede'
|
||||
},
|
||||
'ubuntu': {
|
||||
'url': 'https://cyberpanel.net/openlitespeed-phpconfig-x86_64-ubuntu-static',
|
||||
'sha256': '89aaf66474e78cb3c1666784e0e7a417550bd317e6ab148201bdc318d36710cb',
|
||||
'module_url': 'https://cyberpanel.net/binaries/ubuntu/cyberpanel_ols.so',
|
||||
'module_sha256': '62978ede1f174dd2885e5227a3d9cc463d0c27acd77cfc23743d7309ee0c54ea'
|
||||
}
|
||||
}
|
||||
|
||||
config = BINARY_CONFIGS.get(platform)
|
||||
config = ols_binaries_config.BINARY_CONFIGS.get(platform)
|
||||
if not config:
|
||||
self.stdOut(f"ERROR: No binaries available for platform {platform}", 1)
|
||||
self.stdOut("Skipping custom binary installation", 1)
|
||||
@@ -1329,6 +1314,24 @@ class preFlightsChecks:
|
||||
self.stdOut("=" * 50, 1)
|
||||
# Configure module after installation
|
||||
self.configureCustomModule()
|
||||
# Enable Auto-SSL if not already configured
|
||||
conf_path = '/usr/local/lsws/conf/httpd_config.conf'
|
||||
try:
|
||||
if os.path.exists(conf_path):
|
||||
with open(conf_path, 'r') as f:
|
||||
content = f.read()
|
||||
if 'autoSSL' not in content:
|
||||
content = re.sub(
|
||||
r'(adminEmails\s+\S+)',
|
||||
r'\1\nautoSSL 1\nacmeEmail admin@cyberpanel.net',
|
||||
content,
|
||||
count=1
|
||||
)
|
||||
with open(conf_path, 'w') as f:
|
||||
f.write(content)
|
||||
self.stdOut("Auto-SSL enabled in httpd_config.conf", 1)
|
||||
except Exception as e:
|
||||
self.stdOut(f"WARNING: Could not enable Auto-SSL: {e}", 1)
|
||||
return True
|
||||
|
||||
self.stdOut("ERROR: Installation verification failed", 1)
|
||||
|
||||
@@ -12,6 +12,8 @@ gracefulRestartTimeout 300
|
||||
mime $SERVER_ROOT/conf/mime.properties
|
||||
showVersionNumber 0
|
||||
adminEmails root@localhost
|
||||
autoSSL 1
|
||||
acmeEmail admin@cyberpanel.net
|
||||
adminRoot $SERVER_ROOT/admin/
|
||||
|
||||
errorlog $SERVER_ROOT/logs/error.log {
|
||||
|
||||
51
install/ols_binaries_config.py
Normal file
51
install/ols_binaries_config.py
Normal file
@@ -0,0 +1,51 @@
|
||||
"""
|
||||
OpenLiteSpeed binary configuration - single source of truth for OLS/ModSec URLs and SHA256 hashes.
|
||||
Used by install/install.py, plogical/upgrade.py, and plogical/modSec.py.
|
||||
Update this file when new OLS binaries are released (e.g. v2.4.5).
|
||||
"""
|
||||
# OpenLiteSpeed v2.4.4 - Universal binaries with PHPConfig API, Origin Header Forwarding,
|
||||
# ReadApacheConf with Portmap, Auto-SSL ACME v2, ModSecurity ABI compatibility.
|
||||
# Updated Feb 2026: SSL listener auto-map fix, default VHost wildcard fix.
|
||||
|
||||
BINARY_CONFIGS = {
|
||||
'rhel8': {
|
||||
'url': 'https://cyberpanel.net/openlitespeed-2.4.4-x86_64-rhel8',
|
||||
'sha256': 'd08512da7a77468c09d6161de858db60bcc29aed7ce0abf76dca1c72104dc485',
|
||||
'module_url': 'https://cyberpanel.net/cyberpanel_ols-2.4.4-x86_64-rhel8.so',
|
||||
'module_sha256': '27f7fbbb74e83c217708960d4b18e2732b0798beecba8ed6eac01509165cb432',
|
||||
'modsec_url': 'https://cyberpanel.net/mod_security-2.4.4-x86_64-rhel8.so',
|
||||
'modsec_sha256': 'bbbf003bdc7979b98f09b640dffe2cbbe5f855427f41319e4c121403c05837b2',
|
||||
},
|
||||
'rhel9': {
|
||||
'url': 'https://cyberpanel.net/openlitespeed-2.4.4-x86_64-rhel9',
|
||||
'sha256': '418d2ea06e29c0f847a2e6cf01f7641d5fb72b65a04e27a8f6b3b54d673cc2df',
|
||||
'module_url': 'https://cyberpanel.net/cyberpanel_ols-2.4.4-x86_64-rhel9.so',
|
||||
'module_sha256': '50cb00fa2b8269ec9b0bf300f1b26d3b76d3791c1b022343e1290a0d25e7fda8',
|
||||
'modsec_url': 'https://cyberpanel.net/mod_security-2.4.4-x86_64-rhel9.so',
|
||||
'modsec_sha256': '19deb2ffbaf1334cf4ce4d46d53f747a75b29e835bf5a01f91ebcc0c78e98629',
|
||||
},
|
||||
'ubuntu': {
|
||||
'url': 'https://cyberpanel.net/openlitespeed-2.4.4-x86_64-ubuntu',
|
||||
'sha256': '60edf815379c32705540ad4525ea6d07c0390cabca232b6be12376ee538f4b1b',
|
||||
'module_url': 'https://cyberpanel.net/cyberpanel_ols-2.4.4-x86_64-ubuntu.so',
|
||||
'module_sha256': 'bd47069d13bb098201f3e72d4d56876193c898ebfa0ac2eb26796abebc991a88',
|
||||
'modsec_url': 'https://cyberpanel.net/mod_security-2.4.4-x86_64-ubuntu.so',
|
||||
'modsec_sha256': 'ed02c813136720bd4b9de5925f6e41bdc8392e494d7740d035479aaca6d1e0cd',
|
||||
},
|
||||
}
|
||||
|
||||
# For plogical/modSec.py - compatible ModSecurity binaries (same as BINARY_CONFIGS modsec_*)
|
||||
MODSEC_COMPATIBLE = {
|
||||
'rhel8': {
|
||||
'url': 'https://cyberpanel.net/mod_security-2.4.4-x86_64-rhel8.so',
|
||||
'sha256': 'bbbf003bdc7979b98f09b640dffe2cbbe5f855427f41319e4c121403c05837b2',
|
||||
},
|
||||
'rhel9': {
|
||||
'url': 'https://cyberpanel.net/mod_security-2.4.4-x86_64-rhel9.so',
|
||||
'sha256': '19deb2ffbaf1334cf4ce4d46d53f747a75b29e835bf5a01f91ebcc0c78e98629',
|
||||
},
|
||||
'ubuntu': {
|
||||
'url': 'https://cyberpanel.net/mod_security-2.4.4-x86_64-ubuntu.so',
|
||||
'sha256': 'ed02c813136720bd4b9de5925f6e41bdc8392e494d7740d035479aaca6d1e0cd',
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user