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
This commit is contained in:
eduard256
2026-03-25 10:38:46 +00:00
parent 3b29188924
commit 27117900eb
3742 changed files with 2801 additions and 283718 deletions
+35
View File
@@ -0,0 +1,35 @@
package probe
import (
"bufio"
"os"
"strings"
)
// LookupARP reads /proc/net/arp to find MAC address for ip. Linux only.
func LookupARP(ip string) string {
file, err := os.Open("/proc/net/arp")
if err != nil {
return ""
}
defer file.Close()
scanner := bufio.NewScanner(file)
scanner.Scan() // skip header
for scanner.Scan() {
fields := strings.Fields(scanner.Text())
if len(fields) < 4 {
continue
}
if fields[0] == ip {
mac := fields[3]
if mac == "00:00:00:00:00:00" {
return ""
}
return strings.ToUpper(mac)
}
}
return ""
}