Initial commit: project openvpn-monitor

This commit is contained in:
2025-08-21 22:40:47 +03:00
commit 3c45f22ebe
9 changed files with 456 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?php
define('APP_INIT', true); // ✅ Добавлено
$path = __DIR__ . '/../src/OpenVPNMonitor.php';
if (!file_exists($path)) {
http_response_code(500);
echo json_encode(['error' => 'File not found: ' . $path]);
exit;
}
require_once $path;
header('Content-Type: application/json');
try {
$monitor = new OpenVPNMonitor();
$errors = $monitor->getTlsErrors();
echo json_encode(['tls_errors' => $errors]);
} catch (Exception $e) {
echo json_encode(['error' => $e->getMessage()]);
}