- multistreaming (new): RTMP ingest + multi-platform fan-out with pluggable providers (Twitch/YouTube/Kick/custom), zero-knowledge key vaults, Authelia OIDC auth, shared rooms with editor/streamer roles, single-use invites, per-account streaming grants, and scenes & composition (grid/PiP layouts, text/image overlays, per-output audio routing). - installer: support Dockerfile build in metadata (not just image) and RSA key generation for the Authelia OIDC JWKS. - authelia: add OIDC provider with portainer + multistreaming clients (public + PKCE). - services: remove allprox; add nginx-proxy-manager and portainer; update lldap; regenerate catalog.
22 lines
516 B
JavaScript
22 lines
516 B
JavaScript
'use strict';
|
|
|
|
const crypto = require('crypto');
|
|
|
|
/** Random UUID v4. */
|
|
function uuid() {
|
|
return crypto.randomUUID();
|
|
}
|
|
|
|
/** Random opaque token (invites, stream keys). */
|
|
function token(bytes = 24) {
|
|
return crypto.randomBytes(bytes).toString('hex');
|
|
}
|
|
|
|
/** Constant-time string comparison. */
|
|
function safeEqual(a, b) {
|
|
const ba = Buffer.from(String(a));
|
|
const bb = Buffer.from(String(b));
|
|
return ba.length === bb.length && crypto.timingSafeEqual(ba, bb);
|
|
}
|
|
|
|
module.exports = { uuid, token, safeEqual };
|