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:
parent
da8e1123ec
commit
8fc7e4c0b8
57 changed files with 4031 additions and 257 deletions
|
|
@ -33,7 +33,8 @@ export function streamCreate(root) {
|
|||
|
||||
const mpd = el("input", { placeholder: "https://…/manifest.mpd" });
|
||||
const key = el("textarea", { rows: "3", placeholder: "KID:KEY per line — leave empty for clear streams", spellcheck: "false" });
|
||||
const proxy = el("input", { placeholder: "socks5://127.0.0.1:1080 (optional)" });
|
||||
const egress = el("select", el("option", { value: "", text: "Direct (no tunnel)" }));
|
||||
const proxy = el("input", { placeholder: "socks5://… overrides egress if set" });
|
||||
const headers = el("input", { value: "{}" });
|
||||
const idle = el("input", { type: "number", value: "300", min: "30", max: "86400" });
|
||||
const drm = el("select",
|
||||
|
|
@ -98,6 +99,7 @@ export function streamCreate(root) {
|
|||
channel: chanSel.value,
|
||||
mpd: mpd.value.trim(),
|
||||
key: key.value.trim(),
|
||||
egress: egress.value.trim(),
|
||||
proxy: proxy.value.trim(),
|
||||
headers_json: headers.value.trim() || "{}",
|
||||
tags: tags.value,
|
||||
|
|
@ -171,7 +173,10 @@ export function streamCreate(root) {
|
|||
panel.append(el("div.grid",
|
||||
el("label.span2", el("span.lbl", { text: "Manifest URL" }), mpd),
|
||||
el("label.span2", el("span.lbl", { text: "Keys" }), key),
|
||||
el("label", el("span.lbl", { text: "Origin proxy" }), proxy),
|
||||
el("label", el("span.lbl", { text: "Egress tunnel" }), egress,
|
||||
el("small.hint", { text: "Named WireGuard / SOCKS profile (Settings → Egress). Direct = normal server route." })),
|
||||
el("label", el("span.lbl", { text: "Origin proxy URL" }), proxy,
|
||||
el("small.hint", { text: "Optional raw socks5:// or http://. If set, it overrides the egress dropdown." })),
|
||||
el("label", el("span.lbl", { text: "Headers JSON" }), headers),
|
||||
el("label", el("span.lbl", { text: "Encryption" }), drm),
|
||||
el("label", el("span.lbl", { text: "Rewriter" }), rewriter),
|
||||
|
|
@ -190,6 +195,8 @@ export function streamCreate(root) {
|
|||
row("Title", b.title || "—"),
|
||||
row("Module", b.app ? `${b.app} / ${b.channel || "—"}` : "—"),
|
||||
row("Manifest", b.mpd || "(from module / capture)"),
|
||||
row("Egress", b.egress || "Direct"),
|
||||
row("Origin proxy", b.proxy || "—"),
|
||||
row("Encryption", b.drm_mode),
|
||||
row("On-demand", b.on_demand ? "yes" : "no"),
|
||||
row("Public", b.public ? "yes" : "no"),
|
||||
|
|
@ -256,6 +263,19 @@ export function streamCreate(root) {
|
|||
} catch {
|
||||
// Module list is optional.
|
||||
}
|
||||
try {
|
||||
const eg = await api.egress();
|
||||
clear(egress);
|
||||
egress.append(el("option", { value: "", text: "Direct (no tunnel)" }));
|
||||
for (const p of eg.profiles || []) {
|
||||
const label = p.status && p.status !== "stopped"
|
||||
? `${p.name} (${p.kind}, ${p.status})`
|
||||
: `${p.name} (${p.kind})`;
|
||||
egress.append(el("option", { value: p.name, text: label }));
|
||||
}
|
||||
} catch {
|
||||
// Egress API optional on older servers.
|
||||
}
|
||||
paint();
|
||||
})();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue