feat: improve WireGuard client management and framework initialization
- Improve WireGuard client IP calculation logic (find next available IP) - Add local wireguard-clients directory for storing client configs - Integrate Redis pool into CacheInitializer - Improve ContainerBootstrapper with better imports and Redis pool - Add monitoring role tags for better task organization - Update WireGuard documentation - Store generated WireGuard client configs locally
This commit is contained in:
@@ -15,12 +15,14 @@ use App\Framework\Random\RandomGenerator;
|
||||
use App\Framework\Random\SecureRandomGenerator;
|
||||
use App\Framework\Redis\RedisConfig;
|
||||
use App\Framework\Redis\RedisConnection;
|
||||
use App\Framework\Redis\RedisConnectionPool;
|
||||
use App\Framework\Security\CsrfTokenGenerator;
|
||||
|
||||
final readonly class SessionInitializer
|
||||
{
|
||||
public function __construct(
|
||||
private Container $container
|
||||
private Container $container,
|
||||
private RedisConnectionPool $redisConnectionPool,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -47,8 +49,7 @@ final readonly class SessionInitializer
|
||||
throw new \RuntimeException('Redis extension not loaded');
|
||||
}
|
||||
|
||||
$redisConfig = new RedisConfig(host: 'redis', database: 3);
|
||||
$redisConnection = new RedisConnection($redisConfig, 'session');
|
||||
$redisConnection = $this->redisConnectionPool->getSessionConnection();
|
||||
$storage = new RedisSessionStorage($redisConnection);
|
||||
} catch (\Throwable $e) {
|
||||
// Fallback to file-based storage if Redis is not available
|
||||
|
||||
Reference in New Issue
Block a user