feat: implement automatic metrics collection and monitoring system

This commit is contained in:
infosave2007
2025-11-10 15:19:36 +03:00
parent bccd21b0a5
commit 2de1b58fa4
7 changed files with 114 additions and 13 deletions
+2 -2
View File
@@ -40,9 +40,9 @@ class VpnClient {
public static function create(int $serverId, int $userId, string $name, ?int $expiresInDays = null): int {
$pdo = DB::conn();
// Sanitize client name (replace spaces and special characters)
// Sanitize client name (replace only spaces with underscores, allow any other characters including Cyrillic)
$name = trim($name);
$name = preg_replace('/[^a-zA-Z0-9_-]/', '_', $name);
$name = str_replace(' ', '_', $name);
// Get server data
$server = new VpnServer($serverId);