Commit graph

15 commits

Author SHA1 Message Date
eduard256
44ab0651cb Add DVRIP protocol support
- Register dvrip stream handler using go2rtc pkg/dvrip
- Add default port 34567 for dvrip scheme in URL builder
2026-04-03 21:01:39 +00:00
eduard256
51b11e233f Add RTMP protocol support
Register rtmp, rtmps, rtmpx stream handlers using go2rtc
pkg/rtmp.DialPlay for TCP connect, handshake, and play.
2026-04-03 20:33:30 +00:00
eduard256
4880e1ad14 Add 15s timeout for HTTP handler requests
Cameras under load may accept TCP connection but never respond,
hanging tester workers indefinitely. Context timeout on the HTTP
request ensures workers are released.
2026-04-03 19:26:17 +00:00
eduard256
6abb8409cb Add HTTP/HTTPS protocol support for snapshots and streams
Register http, https, httpx handlers with content-type detection:
- image/jpeg: single JPEG snapshots via go2rtc image.Open
- multipart/x-mixed-replace: MJPEG streams via mpjpeg.Open
- application/vnd.apple.mpegurl: HLS via hls.OpenURL
- auto-detect fallback via magic.Open (MPEG-TS, raw MJPEG, etc.)

Uses go2rtc tcp.Do for Basic + Digest auth and TLS handling.
2026-04-03 16:03:45 +00:00
eduard256
8ce89bec75 Always include port in URL for protocols with raw TCP dial
Bubble protocol uses net.DialTimeout with u.Host directly,
which requires explicit port. Add portRequired set to force
port in generated URLs for such protocols.
2026-04-01 17:53:00 +00:00
eduard256
8e8f568251 Add bubble protocol support
- Register bubble stream handler using go2rtc pkg/bubble
- Add default port 80 for bubble scheme
2026-04-01 17:24:02 +00:00
eduard256
20d5ad2f0b Fix screenshot URL path: remove leading slash 2026-04-01 16:07:22 +00:00
eduard256
f34a7b96c7 Add go2rtc module, test/config/urls pages, Frigate config fixes 2026-03-26 22:45:32 +00:00
eduard256
8dc8ba1096 Add resolution extraction from JPEG screenshots in tester 2026-03-26 10:40:41 +00:00
eduard256
74b4b61198 Add frontend pages, move static to www/, add resolution to tester
Frontend:
- index.html: probe device, navigate to standard/homekit by type
- standard.html: camera config, model search with multi-select
- create.html: stream URL list, custom URL input, create test session
- homekit.html: HomeKit device info, contact links, fallback to standard

Backend:
- Move static files to www/ package with embed (go2rtc pattern)
- Add initStatic() in api with FileServer
- Add width/height to test results from H264 SPS parsing
- Contribute links to gostrix.github.io with auto-filled params
2026-03-26 10:18:40 +00:00
eduard256
4d171f69c7 Add Dockerfile, fix SQLite immutable mode, URL-encode credentials
- Dockerfile: multi-stage build with golang:1.26 and alpine + ffmpeg
- SQLite: use file: URI with immutable=1 for read-only access
- URL builder: encode user/pass with PathEscape/QueryEscape for
  special characters (@, \, :, etc.)
- Health endpoint: truncate uptime to seconds
- Release skill: update smoke test to /api endpoint
- Remove unused ValidateID function
2026-03-25 11:28:47 +00:00
eduard256
27117900eb Rewrite Strix from scratch as single binary
Complete architecture rewrite following go2rtc patterns:
- pkg/ for pure logic (camdb, tester, probe, generate)
- internal/ for application glue with Init() modules
- Single HTTP server on :4567 with all endpoints
- zerolog with password masking and memory ring buffer
- Environment-based config only (no YAML files)

API endpoints: /api/search, /api/streams, /api/test,
/api/probe, /api/generate, /api/health, /api/log

Dependencies: go2rtc v1.9.14, go-sqlite3, miekg/dns, zerolog
2026-03-25 10:38:46 +00:00
eduard256
e9dc04178e Fix SSE real-time streaming in Home Assistant Ingress mode
Add padding to overcome aiohttp 64KB buffer in HA Supervisor.

Problem:
- HA Supervisor uses aiohttp with 64KB StreamResponse buffer
- Small SSE events (~200-500 bytes) were buffered until connection closed
- Users saw all streams appear at once instead of real-time updates

Solution:
- Detect Ingress mode via X-Ingress-Path header
- Add 64KB SSE comment padding to fill proxy buffers
- Increase progress interval to 3 sec in Ingress mode (reduce traffic)
- Normal mode (Docker/direct) unchanged - works exactly as before

Traffic impact:
- Normal mode: ~17KB per scan (unchanged)
- Ingress mode: ~2-3MB per scan (acceptable for real-time updates)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-11 16:34:05 +00:00
eduard256
453769a376 Add multi-authentication support and comprehensive stream discovery
Major improvements to camera stream discovery system:

**Multi-Authentication Support:**
- Implement smart authentication fallback chain for HTTP/MJPEG/JPEG streams
- Add combined authentication method (Basic Auth header + query params) - fixes ZOSI cameras
- Support for: No Auth, Basic Auth, Query Params, Combined, Digest
- Auto-detect authentication method from URL and try appropriate chain

**Protocol & Detection Enhancements:**
- Add HLS (.m3u8) stream detection
- Add MPEG-DASH (.mpd) stream detection
- Add WebSocket stream detection
- Improve JPEG detection by URL extension when Content-Type is incorrect
- Add AuthMethod field to DiscoveredStream model

**Bug Fixes:**
- Fix port 0 bug: use default ports (HTTP=80, HTTPS=443, RTSP=554) when entry.Port==0
- Ensure URLs are built with correct ports from database or defaults

**Debug & Logging:**
- Add comprehensive DEBUG logging to builder.go (URL generation)
- Add comprehensive DEBUG logging to tester.go (stream testing & auth)
- Add comprehensive DEBUG logging to scanner.go (URL collection & deduplication)
- Log auth method detection, chain determination, and test results

**Results:**
- Tested with ZOSI ZG23213M camera: 4 streams found (was 0)
- Combined auth method successfully detects streams requiring both header + params
- Better coverage for cameras with non-standard authentication requirements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 02:15:21 +03:00
eduard256
f80f7ab314 Add Strix camera discovery system with comprehensive database
This commit adds the complete Strix IP camera stream discovery system:
- Go-based API server with SSE support for real-time updates
- 3,600+ camera brand database with stream URL patterns
- Intelligent fuzzy search across camera models
- ONVIF discovery and stream validation
- RESTful API with health check, camera search, and stream discovery
- Makefile for building and deployment
- Comprehensive README documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 17:45:04 +03:00