Commit Graph

106 Commits

Author SHA1 Message Date
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 0ecf1eb75f Use app.Env for consistent env var access in frigate module 2026-03-25 19:41:25 +00:00
eduard256 e2fdf0d3d6 Add Frigate config proxy with auto-discovery 2026-03-25 19:20:07 +00:00
eduard256 fe4a5dfa2e Simplify Frigate detection, use known HA addon hostname 2026-03-25 19:08:23 +00:00
eduard256 5fdeca8701 Add raw Supervisor API response to frigate check endpoint 2026-03-25 18:58:53 +00:00
eduard256 124007ea31 Rebuild dev image 2026-03-25 18:46:56 +00:00
eduard256 62dcd89fc5 Simplify listHAAddons to return raw Supervisor API JSON 2026-03-25 18:37:53 +00:00
eduard256 a9ab7e2ba6 Add Frigate autodiscovery via HA Supervisor API 2026-03-25 18:30:38 +00:00
eduard256 b060a5372e Add frigate connectivity check endpoint 2026-03-25 18:15:31 +00:00
eduard256 0bf2a83e9d Add probe detector skill 2026-03-25 17:42:22 +00:00
eduard256 bfeae738e3 Add add_protocol skill, update release skills with DB download step 2026-03-25 17:37:20 +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 3b29188924 Fix database link to homepage 2026-03-23 20:25:02 +00:00
eduard256 3a18390f42 Add camera database browse link to README 2026-03-23 20:20:59 +00:00
eduard256 87c96970a6 Add camera contribution link to README 2026-03-23 20:12:13 +00:00
eduard256 9e493a2bac Add Podman installation docs with required capabilities
Document NET_RAW and NET_ADMIN capabilities needed for network
scanning when running Strix with Podman. Includes podman run,
podman-compose, and Quadlet (systemd) setup instructions.

Addresses #6
2026-03-22 17:56:10 +00:00
eduard256 3fafdbc6ce Separate structured logs from human-readable output
Move SetupLogger() to a standalone function called before config.Load()
so the logger is available from the very start. Replace all fmt.Printf
calls in config.go with slog calls. Redirect banner and endpoint info
to stderr, keeping stdout clean for structured log output (JSON/text).

Fixes #5
2026-03-22 17:44:16 +00:00
eduard256 4fe5ae9447 URL-encode credentials with special characters in stream URLs
Passwords containing @, #, :, ?, /, %, &, space and other special
characters broke URL parsing, causing streams to not be detected.

Replaced fmt.Sprintf string concatenation with url.URL struct for
building RTSP/HTTP URLs. Credentials in userinfo are now handled via
url.UserPassword() which encodes special chars automatically.

Split replacePlaceholders into two phases:
- Phase 1: safe placeholders (channel, width, IP, port)
- Phase 2: credential placeholders with context-aware encoding:
  - Query string: url.Values.Set + Encode (auto percent-encoding)
  - Path segments: url.PathEscape

Normal passwords (letters, digits, -._~) produce identical URLs
as before -- encoding is a no-op for safe characters.

Fixes #10
2026-03-22 17:13:38 +00:00
eduard256 3acc966658 Mask URL-encoded passwords in debug logs
SecretStore.Add now registers both plain text and URL-encoded forms
of the password. Fixes cases where passwords with special characters
(e.g. @, #, :) appear percent-encoded in URLs but were not matched
by the masking handler.
2026-03-20 19:59:22 +00:00
eduard256 8cf05a1576 Fix credentials leaking in debug logs (#4)
Add a secret-masking slog.Handler that automatically replaces registered
passwords with "***" in all log output. Secrets are registered per-scan
when a discovery request arrives and unregistered when it completes.

This approach masks credentials everywhere they appear in logs — URL
userinfo, query parameters, path segments, and Go HTTP error messages —
without modifying any business logic in scanner, builder, tester, or
ONVIF components. API responses are unaffected and still return full
URLs with credentials for frontend use.
2026-03-20 11:03:01 +00:00
eduard256 e269e243da Add icon variants with dark background and transparent versions 2026-03-19 12:44:20 +00:00
eduard256 0205e32257 Merge develop into main for v1.0.11 release v1.0.11 2026-03-19 11:33:03 +00:00
eduard256 c576b09e8b Release v1.0.11 2026-03-19 11:32:58 +00:00
eduard256 25f1907fc3 Register HEAD route for health endpoint in chi router 2026-03-19 11:25:57 +00:00
eduard256 cc8c3e4f14 Fix health endpoint HEAD method support, add icon assets
- Allow HEAD requests on /api/v1/health for Docker/CasaOS healthcheck
  compatibility (wget --spider sends HEAD)
- Add project icon in SVG, 192x192 PNG and 512x512 PNG formats
2026-03-19 11:17:22 +00:00
eduard256 4bd2de78dc Merge develop into main for v1.0.10 release v1.0.10 2026-03-17 07:27:07 +00:00
eduard256 89a7c87462 Release v1.0.10 2026-03-17 07:26:58 +00:00
eduard256 e40dccbb90 Remove CI/CD, unify Docker image for Docker Hub and HA add-on
- Remove GitHub Actions workflows (ci.yml, docker.yml, release.yml)
- Remove GoReleaser configuration
- Remove RELEASE.md (replaced by /release_strix skill)
- Add HA options.json support in config.go (reads /data/options.json)
- Add Version field to Config, pass real version to health endpoint
- Change Version from const to var, inject via ldflags at build time
- Add ARG VERSION to Dockerfile for build-time version injection
- Reset webui/package.json version to 0.0.0 (not used functionally)
- Clear probe fields on back navigation in frontend
- Add /release_strix and /release_strix_dev skills
2026-03-17 07:23:04 +00:00
eduard256 fe93aa329c Integrate probe endpoint into frontend
- Add ProbeAPI client (js/api/probe.js)
- Add reusable modal component (js/ui/modal.js) with overlay, animations
- Call GET /api/v1/probe after Check Address click
- Auto-fill Camera Model with vendor from ARP/OUI lookup
- Show modal on unreachable device with Change IP / Continue Anyway buttons
- Add modal CSS styles matching existing dark theme
2026-03-16 20:05:00 +00:00
eduard256 ddf2b4a373 Remove experimental SSE warning from Home Assistant Add-on section 2026-03-16 14:56:55 +00:00
eduard256 833da5cf48 Remove experimental SSE warning from Home Assistant Add-on section 2026-03-16 14:55:57 +00:00
eduard256 3fec89be7f Add HTTP prober, optimize mDNS timeout, add Trassir/ZOSI to OUI
- Add HTTPProber: parallel HEAD+GET on ports 80/8080, extracts Server header
- Reduce mDNS timeout from 1s to 100ms using context wrapper around
  mdns.Query (HomeKit devices respond in 2-10ms, no need to wait 1s)
- Add Trassir (F0:23:B9) and ZOSI (00:05:FE) to camera OUI database
- Probe response time improved from ~1s to ~110ms for reachable devices
2026-03-16 14:46:58 +00:00
eduard256 4d6c2fd878 Add GET /api/v1/probe endpoint for device inspection
Fast (~1-3s) endpoint that gathers network info about a device
before full stream discovery. Runs ping first, then parallel probes.

Features:
- Ping with ICMP + TCP fallback (works without root)
- Reverse DNS hostname lookup
- ARP table MAC address + OUI vendor identification (2403 entries, 51 camera vendors)
- mDNS HomeKit detection (camera/doorbell, paired status)
- Extensible Prober interface for adding new probe types
- 3-second overall timeout, parallel execution

Response includes "type" field:
- "unreachable" - device not responding
- "standard" - normal IP camera (RTSP/HTTP/ONVIF flow)
- "homekit" - Apple HomeKit camera (PIN pairing flow)
2026-03-16 13:57:41 +00:00
eduard256 eb8cc546c8 Merge main into develop: Add release documentation 2025-12-11 16:53:02 +00:00
eduard256 1fc345c569 Add release process documentation 2025-12-11 16:52:53 +00:00
eduard256 0c0d743594 Merge develop into main for v1.0.9 release v1.0.9 2025-12-11 16:40:39 +00:00
eduard256 787919d20b Release v1.0.9: Fix SSE real-time streaming in Home Assistant Ingress mode 2025-12-11 16:40:31 +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 915c1dec1b Add stream categorization: Recommended/Alternative with Main/Sub/Other subgroups
- Split discovered streams into Recommended (FFMPEG, ONVIF) and Alternative groups
- Add Main/Sub/Other classification within Recommended based on resolution:
  - Main: streams with width >= 720px (after clustering analysis)
  - Sub: streams with width < 720px or lower cluster
  - Other: streams without resolution info
- Implement smart auto-collapse based on selection mode:
  - Main selection: shows Recommended/Main, collapses rest
  - Sub selection: shows Recommended/Sub, collapses rest
  - Falls back to showing all if target category is empty
- Add collapsible groups/subgroups with chevron toggles
- User manual expand/collapse preserved until mode change
- Add stream count badges to all group headers
2025-12-11 09:49:46 +00:00
eduard256 e6828d8a22 Add ?mp4 parameter support for BUBBLE streams in Frigate config
- Add buildRtspPath() helper method to conditionally append ?mp4
- Only BUBBLE stream types get ?mp4 suffix for proper recording
- Other stream types (RTSP, ONVIF, JPEG, etc.) remain unchanged
- Handles both single and dual-stream configurations correctly
2025-11-26 15:29:56 +03:00
eduard256 eedce14731 Merge branch 'develop' v1.0.8 2025-11-26 13:01:32 +03:00
eduard256 9975aa71de Release v1.0.8: Use host network mode for Docker deployments 2025-11-26 13:01:27 +03:00
eduard256 38e4af230f Use host network mode for Docker deployments
- Update docker run command to use --network host
- Update docker-compose.yml to use network_mode: host
- Update docker-compose.full.yml to use network_mode: host
- Remove port mappings as they are not needed with host network
2025-11-26 12:57:45 +03:00
eduard256 031e494787 Merge develop into main for v1.0.7 release v1.0.7 2025-11-23 22:54:20 +03:00
eduard256 de389588ce Release v1.0.7: Fix Hikvision channel numbering and improve database
- Fixed channel numbering for Hikvision-style cameras (reported by @sergbond_com)
- Added universal [CHANNEL+1] placeholder support
- Supports both 0-based and 1-based channel numbering
- Updated 14 camera brands with universal patterns
- Fixed brand+model search matching
- Removed invalid test data from database
2025-11-23 22:54:03 +03:00
eduard256 4c03ad8d3c Add [CHANNEL+1] placeholder support for Hikvision-style channel numbering
- Added [CHANNEL+1], [channel+1], {CHANNEL+1}, {channel+1} placeholders to builder.go
- Updated 14 camera brands with universal channel patterns
- Hikvision: replaced 10 hardcoded patterns with 6 universal patterns
- Hiwatch: replaced 4 hardcoded patterns with 8 universal patterns (including ISAPI)
- Other brands: Annke, Swann, Abus, 7links, LevelOne, AlienDVR, Oswoo, AV102IP-40, Acvil, TBKVision, Deltaco, Night Owl
- Universal patterns placed first for faster discovery, hardcoded patterns kept as fallback
- Supports both 0-based (channel=0 -> 101) and 1-based (channel=1 -> 101) numbering
- Added 6 high-priority patterns to popular_stream_patterns.json
2025-11-23 22:39:20 +03:00