Debian
a798d1b796
feat(firewall-log): Phase 2 — HTTP-Tail + WebSocket-Live-Stream
Backend für /firewall-Live-Tail und historische Recherche der
ulogd2-JSONL aus Phase 1.
internal/services/firewalllog/
reader.go — JSONL parser + Filter (since/until/rule_id/src/dst/
proto/action/limit). Proto-Mapping aus IP-Protocol-Number
(1=icmp, 6=tcp, 17=udp, 58=icmpv6). RuleID wird aus
oob.prefix "edgeguard:<id>" extrahiert.
tailer.go — fsnotify-Watcher auf /var/log/edgeguard/, In-Memory
Ring-Buffer 1000 Events, fan-out an Subscribe()-Channel.
Robust gegen logrotate copytruncate (truncate-detection
via stat.Size() < offset → seek(0)). Safety-Net 2s-poll
falls fsnotify einen Write verschluckt. Non-blocking send
an Subscriber — langsame Clients droppen Events statt
die Pipeline zu blockieren.
internal/handlers/firewall_log.go:
GET /api/v1/firewall/log — typed JSON list, Filter via Query
WS /api/v1/firewall/log/live — Snapshot + live broadcast
(gorilla/websocket, 30s-ping)
main.go: Tailer beim Startup gestartet (context.Background) — UI
landet in Phase 3.
deps: gorilla/websocket v1.5.3, fsnotify v1.10.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 21:05:39 +02:00
..
2026-05-08 18:45:41 +02:00
2026-05-11 06:58:54 +02:00
2026-05-09 11:52:54 +02:00
2026-05-08 18:45:41 +02:00
2026-05-11 06:32:59 +02:00
2026-05-11 21:51:09 +02:00
2026-05-12 20:44:00 +02:00
2026-05-12 21:05:39 +02:00
2026-05-12 13:45:47 +02:00
2026-05-11 13:41:16 +02:00
2026-05-11 21:51:09 +02:00
2026-05-08 18:45:41 +02:00
2026-05-12 21:05:39 +02:00
2026-05-11 06:24:51 +02:00
2026-05-11 07:18:45 +02:00
2026-05-10 23:43:39 +02:00