fix:max logs MySql

This commit is contained in:
infosave2007
2026-02-25 06:57:04 +03:00
parent a037f13325
commit 19078b03dd
2 changed files with 7 additions and 5 deletions
+2
View File
@@ -10,3 +10,5 @@ collation-server = utf8mb4_unicode_ci
init_connect = 'SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci'
init_connect = 'SET collation_connection = utf8mb4_unicode_ci'
skip-character-set-client-handshake
binlog_expire_logs_seconds = 259200
max_binlog_size = 100M
+2 -2
View File
@@ -2709,7 +2709,7 @@ Router::post('/api/servers/{id}/protocols/selftest', function ($params) {
$err = (string) ($derived['error'] ?? 'derive_failed');
// If we can't derive locally (e.g., libsodium missing), fall back to wg inside container.
if ($err === 'libsodium_not_available') {
$shComputePub = "set -e; priv=" . escapeshellarg($cfgPrivate) . "; printf '%s' \"$priv\" | wg pubkey";
$shComputePub = "set -e; priv=" . escapeshellarg($cfgPrivate) . "; printf '%s' \"\$priv\" | wg pubkey";
$cmdComputePub = "docker exec -i " . escapeshellarg($containerName) . " sh -c " . escapeshellarg($shComputePub);
$computedClientPub = trim($server->executeCommand($cmdComputePub, true));
} else {
@@ -2949,7 +2949,7 @@ Router::post('/api/servers/{id}/protocols/diagnose-handshake', function ($params
} else {
$clientPubError = (string) ($derived['error'] ?? 'derive_failed');
// Fallback: compute using wg inside container (best-effort)
$shComputePub = "set -e; priv=" . escapeshellarg($cfgPrivate) . "; printf '%s' \"$priv\" | wg pubkey";
$shComputePub = "set -e; priv=" . escapeshellarg($cfgPrivate) . "; printf '%s' \"\$priv\" | wg pubkey";
$cmdComputePub = "docker exec -i " . escapeshellarg($containerName) . " sh -c " . escapeshellarg($shComputePub);
$computed = trim((string) $server->executeCommand($cmdComputePub, true));
// Basic validation: wg outputs a 44-char base64 key