refactor(deployment): Remove WireGuard VPN dependency and restore public service access
Remove WireGuard integration from production deployment to simplify infrastructure: - Remove docker-compose-direct-access.yml (VPN-bound services) - Remove VPN-only middlewares from Grafana, Prometheus, Portainer - Remove WireGuard middleware definitions from Traefik - Remove WireGuard IPs (10.8.0.0/24) from Traefik forwarded headers All monitoring services now publicly accessible via subdomains: - grafana.michaelschiemer.de (with Grafana native auth) - prometheus.michaelschiemer.de (with Basic Auth) - portainer.michaelschiemer.de (with Portainer native auth) All services use Let's Encrypt SSL certificates via Traefik.
This commit is contained in:
77
tests/debug/test-qrcode-validation.php
Normal file
77
tests/debug/test-qrcode-validation.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once __DIR__ . '/../../vendor/autoload.php';
|
||||
|
||||
use App\Framework\QrCode\QrCodeGenerator;
|
||||
use App\Framework\QrCode\QrCodeRenderer;
|
||||
use App\Framework\QrCode\ValueObjects\ErrorCorrectionLevel;
|
||||
|
||||
// Test simple URL
|
||||
$testUrl = 'https://localhost/';
|
||||
|
||||
echo "Testing QR Code generation for: {$testUrl}\n\n";
|
||||
|
||||
try {
|
||||
$renderer = new QrCodeRenderer();
|
||||
$generator = new QrCodeGenerator($renderer);
|
||||
|
||||
// Generate matrix
|
||||
$matrix = \App\Framework\QrCode\QrCodeGenerator::generate($testUrl);
|
||||
|
||||
echo "Matrix generated successfully\n";
|
||||
echo "Version: " . $matrix->getVersion()->getVersionNumber() . "\n";
|
||||
echo "Size: " . $matrix->getSize() . "x" . $matrix->getSize() . "\n";
|
||||
echo "Dark modules: " . $matrix->countDarkModules() . "\n\n";
|
||||
|
||||
// Generate SVG
|
||||
$svg = $generator->generateSvg($testUrl);
|
||||
echo "SVG length: " . strlen($svg) . " characters\n";
|
||||
|
||||
// Generate Data URI
|
||||
$dataUri = $generator->generateDataUri($testUrl);
|
||||
echo "Data URI length: " . strlen($dataUri) . " characters\n";
|
||||
echo "Data URI prefix: " . substr($dataUri, 0, 50) . "...\n\n";
|
||||
|
||||
// Check matrix structure
|
||||
echo "Checking matrix structure:\n";
|
||||
$size = $matrix->getSize();
|
||||
|
||||
// Check finder patterns
|
||||
$topLeft = $matrix->getModuleAt(0, 0)->isDark();
|
||||
$topRight = $matrix->getModuleAt(0, $size - 1)->isDark();
|
||||
$bottomLeft = $matrix->getModuleAt($size - 1, 0)->isDark();
|
||||
|
||||
echo "Top-left finder (0,0): " . ($topLeft ? "dark" : "light") . "\n";
|
||||
echo "Top-right finder (0," . ($size - 1) . "): " . ($topRight ? "dark" : "light") . "\n";
|
||||
echo "Bottom-left finder (" . ($size - 1) . ",0): " . ($bottomLeft ? "dark" : "light") . "\n";
|
||||
|
||||
// Check format information row
|
||||
echo "\nFormat information row (row 8):\n";
|
||||
for ($col = 0; $col < min(15, $size); $col++) {
|
||||
$module = $matrix->getModuleAt(8, $col);
|
||||
echo $module->isDark() ? '█' : '░';
|
||||
}
|
||||
echo "\n";
|
||||
|
||||
// Check format information column
|
||||
echo "Format information column (col 8, bottom 7):\n";
|
||||
for ($row = $size - 7; $row < $size; $row++) {
|
||||
$module = $matrix->getModuleAt($row, 8);
|
||||
echo $module->isDark() ? '█' : '░';
|
||||
}
|
||||
echo "\n";
|
||||
|
||||
// Save SVG to file for manual inspection
|
||||
$svgFile = __DIR__ . '/qrcode-test.svg';
|
||||
file_put_contents($svgFile, $svg);
|
||||
echo "\nSVG saved to: {$svgFile}\n";
|
||||
echo "You can open this file in a browser or QR code scanner to test.\n";
|
||||
|
||||
} catch (\Exception $e) {
|
||||
echo "ERROR: " . $e->getMessage() . "\n";
|
||||
echo "Trace:\n" . $e->getTraceAsString() . "\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user