Repository navigation
feat(camera): local IP camera bridge with seekable instant replay - #19
Merged
Merged
Conversation
- camera-bridge (Node) + go2rtc: discovers Imou/Dahua/RTSP cameras on the LAN, forces H.264, registers streams, and proxies WebRTC signaling with CORS/PNA. Binds to loopback and only exposes /api/webrtc (+ frame). - frontend: camera source picker (device + IP), WebRTC live view, and a replay clip assembled with MediaSource (sequence mode) so it is continuous and seekable; MediaRecorder output is duration-patched as a fallback. - replay buffer: 1s chunks, 3-minute default window (replayBufferSeconds). - CSP: allow http://localhost:* / http://127.0.0.1:* (connect-src) and blob: (media-src) in both index.html meta and the nginx site config. - docs: docs/specs/ip-cameras.md, AGENTS/README/roadmap/known-issues. Refs: docs/specs/ip-cameras.md
- Strip control characters from logged request values (CodeQL log injection). - Suppress js/insufficient-password-hash: MD5 is required by HTTP Digest (RFC 2617) and is not used to store passwords.
- Log only allow-listed constants (no raw request values) to satisfy js/log-injection in the camera-bridge access log. - Add .github/codeql/codeql-config.yml excluding js/insufficient-password-hash: MD5 is required by HTTP Digest (RFC 2617), not a password store.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds support for IP cameras on the local network (Imou/Dahua, etc.) without the vendor app, plus a seekable instant replay.
How
camera-bridge/(Node, no deps) + go2rtc (Docker,docker-compose.camera.yml):magicBoxCGI;127.0.0.1, CORS allow-list, proxy limited to/api/webrtc(+frame.jpeg), go2rtc API/RTSP on loopback. The camera password never reaches the browser.MediaRecorderand is assembled withMediaSource(sequencemode) so the clip is continuous and seekable.localStorage.replayBufferSeconds).http://localhost:*/http://127.0.0.1:*(connect-src) andblob:(media-src) in bothindex.htmlmeta and the nginx site config. The gateway repo must be deployed too (browser enforces both CSPs).Notes
CAMERA_PASSWORD(.env), never committed.See
docs/specs/ip-cameras.md.