streamd: serve start/stop/update, streamd.yaml, egress, module panel fixes

- Add streamd serve start|stop|restart|status|update with auto-written streamd.yaml
- Panel modules: STREAMD_MODULES_DIR for describe, YAML channel fallback, textarea value fix
- Per-stream WireGuard/SOCKS egress profiles + Settings UI
- Drop drm-* from release builds; track streamd-bg.sh / streamd-update.sh wrappers
- Docs: streamd-server-setup lifecycle and update flow
This commit is contained in:
404errordeveloper 2026-10-10 18:05:51 +02:00
parent da8e1123ec
commit 8fc7e4c0b8
57 changed files with 4031 additions and 257 deletions

View file

@ -162,6 +162,7 @@ func (h *Handler) duplicate(w http.ResponseWriter, r *http.Request, id int64) {
Key: src.Key,
HeadersJSON: src.HeadersJSON,
Proxy: src.Proxy,
Egress: src.Egress,
VideoSelect: src.VideoSelect,
AudioSelect: src.AudioSelect,
Rewriter: src.Rewriter,
@ -271,9 +272,19 @@ func (h *Handler) doProbe(ctx context.Context, st db.Stream, target string) prob
start := time.Now()
client := &http.Client{Timeout: 20 * time.Second}
// Fetch through the stream's own proxy, so a geo-restricted origin is
// probed the same way the downloader would reach it.
if proxy := strings.TrimSpace(st.Proxy); proxy != "" {
// Fetch through the stream's effective proxy (explicit or named egress),
// so a geo-restricted origin is probed the same way the downloader would.
proxy := strings.TrimSpace(st.Proxy)
if h.Egress != nil {
if p, err := h.Egress.ResolveProxy(st); err == nil {
proxy = p
} else if strings.TrimSpace(st.Egress) != "" && proxy == "" {
res.Error = "egress: " + err.Error()
res.Summary = "egress profile could not be brought up"
return res
}
}
if proxy != "" {
if c, err := httpClientWithProxy(proxy); err == nil {
client = c
} else {