fix(gen1): allow Radegast-ng, handle NexBus shutdown safely, add opt-in wolfvoice adapter (#334)

* fix(gen1): allow Radegast-ng and Radegast channel aliases under existing viewer policy

* fix(gen1): allow Radegast-ng and Radegast channel aliases under existing viewer policy

* fix(gen1): allow Radegast-ng and Radegast channel aliases under existing viewer policy

* fix(gen1): return HTTP 503 for NexBus requests racing disposed NodeAgent on shutdown

* docs(gen1): include Radegast-ng in access policy and rejection messages

* docs(gen1): include Radegast-ng in access policy and rejection messages

* docs(gen1): include Radegast-ng in access policy and rejection messages

* feat(gen1): reproducible opt-in build of pinned Wolfvoice WebRTC region addon

* feat(gen1): optional Wolfvoice region configuration with TLS, key, and CAPS-conflict preflight

* docs(gen1): Wolfvoice 0.2.0 integration, upstream hard dependency and safe opt-in procedure

* chore(gen1): avoid accidentally vendoring fetched Wolfvoice addon sources

* test(gen1): verify NexBus shutdown, Radegast-ng and Wolfvoice opt-in safety

* test(gen1): verify NexBus shutdown, Radegast-ng and Wolfvoice opt-in safety

* ci(gen1): enforce Radegast-ng, NodeAgent shutdown and optional Wolfvoice integration contracts

* ci(gen1): independently build pinned Wolfvoice region addon against NexVerse and validate opt-in config

* test(gen1): scope shutdown exception-handler ordering to Receive branch
This commit is contained in:
OpenGenesis (MPL 2.0) authored and GitHub committed 2026-10-28 18:02:52 +01:00
1 parent 10960e4cc2
commit 851dd14289
15 files changed
+408 -8

No files matched your search

+9
View File
@@ -846,6 +846,15 @@ jobs:
python3 tools/ci/verify_gen1_approved_viewer_access.py
dotnet run --project tools/ci/OglApprovedViewerRegression/OglApprovedViewerRegression.csproj --configuration Release
- name: Verify NexBus shutdown race and Wolfvoice integration
shell: bash
run: |
set -euo pipefail
python3 tools/ci/verify_gen1_nexbus_shutdown.py
python3 tools/ci/verify_gen1_wolfvoice_compat.py
bash -n tools/voice/install-wolfvoice-region-addon.sh
bash -n tools/voice/configure-wolfvoice-region.sh
- name: Runtime smoke test LLLogin protocol
shell: bash
run: bash tools/ci/smoke_lllogin_protocol.sh
@@ -0,0 +1,59 @@
name: Wolfvoice Region Addon Compatibility
on:
workflow_dispatch:
pull_request:
paths:
- 'tools/voice/**'
- 'doc/NexVerse/GEN1_WOLFVOICE_COMPATIBILITY.md'
- '.github/workflows/ogl-wolfvoice-compatibility.yml'
permissions:
contents: read
jobs:
build-addon:
name: Build hardened WebRTC region addon
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- name: Checkout OpenGenesisLINK
uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Install native dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgdiplus libc6-dev
- name: Validate integration safety contracts
run: |
python3 tools/ci/verify_gen1_wolfvoice_compat.py
bash -n tools/voice/install-wolfvoice-region-addon.sh
bash -n tools/voice/configure-wolfvoice-region.sh
- name: Fetch and compile pinned hardened WebRTC addon
run: |
chmod +x runprebuild.sh
bash tools/voice/install-wolfvoice-region-addon.sh build
- name: Validate opt-in config with disposable test credentials
shell: bash
run: |
set -euo pipefail
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
umask 077
openssl rand -hex 32 > "$tmp/rpc_key"
openssl rand -hex 32 > "$tmp/cred_key"
export WOLFVOICE_RPC_KEY_FILE="$tmp/rpc_key"
export WOLFVOICE_CRED_KEY_FILE="$tmp/cred_key"
bash tools/voice/configure-wolfvoice-region.sh \
https://voice-ci.stadt-nexverse.test:9443 "$tmp/wolfvoice.ini"
grep -Fq 'Enabled = false' "$tmp/wolfvoice.ini"
grep -Fq 'WebRtcVoice.dll:WebRtcVoiceServiceConnector' "$tmp/wolfvoice.ini"
grep -Fq 'PositionFeed = true' "$tmp/wolfvoice.ini"
+4
View File
@@ -28,3 +28,7 @@ bin/maptiles/
# Grid-specific terrain source data and accidental filesystem cache copy
bin/nexverse-deutschland/
bin/opt/
# Optional, pinned external wolfvoice region addon, fetched by operator.
# Do not accidentally vendor its full upstream source or build outputs.
/addon-modules/os-webrtc-janus/
@@ -52,6 +52,9 @@ namespace NexVerse.RegionModules.NodeAgent
new ConcurrentDictionary<UUID, ObjectMessageRateState>();
private bool m_Enabled;
// Inbound HTTP may finish after Close starts and the bus is disposed.
// Reject new events during shutdown instead of logging a spurious 500.
private int m_Stopping;
private string m_NodeId = string.Empty;
private string m_SharedKey = string.Empty;
private string m_InboundPath = "/internal/nexbus/v1/events";
@@ -210,6 +213,7 @@ namespace NexVerse.RegionModules.NodeAgent
queueCapacity,
timeoutMs);
m_Bus = new DistributedNexEventBus(m_Transport, deduplicationWindow);
Interlocked.Exchange(ref m_Stopping, 0);
m_StartedAt = DateTimeOffset.UtcNow;
m_Enabled = true;
@@ -347,7 +351,7 @@ namespace NexVerse.RegionModules.NodeAgent
public void Close()
{
if (!m_Enabled)
if (!m_Enabled || Interlocked.Exchange(ref m_Stopping, 1) != 0)
return;
try
@@ -2366,6 +2370,13 @@ namespace NexVerse.RegionModules.NodeAgent
response.KeepAlive = false;
response.ContentType = "application/json; charset=utf-8";
if (Volatile.Read(ref m_Stopping) != 0 || !m_Enabled)
{
WriteInbound(response, HttpStatusCode.ServiceUnavailable,
new { error = "node_shutting_down" });
return;
}
if (request == null ||
!string.Equals(
request.HttpMethod,
@@ -2426,7 +2437,17 @@ namespace NexVerse.RegionModules.NodeAgent
try
{
bool accepted = m_Bus.Receive(nexEvent);
// Close() may race with a validated, in-flight HTTP request.
// Snapshot and guard the bus; still handle disposal after the check.
DistributedNexEventBus bus = m_Bus;
if (Volatile.Read(ref m_Stopping) != 0 || bus == null)
{
WriteInbound(response, HttpStatusCode.ServiceUnavailable,
new { error = "node_shutting_down" });
return;
}
bool accepted = bus.Receive(nexEvent);
WriteInbound(
response,
HttpStatusCode.Accepted,
@@ -2436,6 +2457,12 @@ namespace NexVerse.RegionModules.NodeAgent
event_id = nexEvent.EventId
});
}
catch (ObjectDisposedException)
{
// Expected for requests already authenticated when teardown begins.
WriteInbound(response, HttpStatusCode.ServiceUnavailable,
new { error = "node_shutting_down" });
}
catch (Exception e)
{
m_Log.Error(
+1 -1
View File
@@ -12,7 +12,7 @@ namespace OpenSim.Framework
{
private static readonly string[] s_AllowedNames =
{
"Firestorm", "OpenGenesisLINK", "OGL Viewer"
"Firestorm", "OpenGenesisLINK", "OGL Viewer", "Radegast-ng", "Radegast"
};
private static readonly string[] s_KnownCopybotNames =
+1 -1
View File
@@ -4054,7 +4054,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_OglApprovedViewersOnly &&
!OglApprovedViewerPolicy.IsAllowed(acd.Viewer, acd.Channel))
{
reason = "Only Firestorm or OpenGenesisLINK Viewer is permitted";
reason = "Only Firestorm, OpenGenesisLINK or Radegast-ng Viewer is permitted";
m_log.InfoFormat("[OGL VIEWER ACCESS]: Region {0} rejected viewer {1}, channel {2}",
RegionInfo.RegionName, acd.Viewer, acd.Channel);
return false;
@@ -338,7 +338,7 @@ namespace OpenSim.Services.HypergridService
if (m_OglApprovedViewersOnly &&
!OglApprovedViewerPolicy.IsAllowed(aCircuit.Viewer, aCircuit.Channel))
{
reason = "Only Firestorm or OpenGenesisLINK Viewer is permitted";
reason = "Only Firestorm, OpenGenesisLINK or Radegast-ng Viewer is permitted";
m_log.InfoFormat("[OGL VIEWER ACCESS]: Rejected Hypergrid arrival using viewer {0}, channel {1}",
aCircuit.Viewer, aCircuit.Channel);
return false;
+3 -2
View File
@@ -6,6 +6,7 @@
- **Firestorm Viewer** – `Firestorm` und Firestorm-Channel wie `Firestorm-Releasex64`
- **OpenGenesisLINK Viewer** – `OpenGenesisLINK` und der projektinterne Name `OGL Viewer`
- **Radegast-ng** – `Radegast-ng` und kompatibler Alias `Radegast`
Andere selbst gemeldete Viewernamen – einschließlich **Darkstorm**, **Hydrastorm**, Alchemy, Singularity, Cool VL und unbekannter Clients – sind nicht zugelassen.
@@ -27,7 +28,7 @@ OGLApprovedViewersOnly = true
Das gilt sowohl für ROBUST (LoginService **und** GatekeeperService) als auch für jeden Simulator (`OpenSim.ini`). Nach einem Update müssen tatsächlich geladene Konfigurationen auf allen Nodes geprüft und die betroffenen Dienste neu gestartet werden. Für Tests kann die Option in einer isolierten Umgebung auf `false` gesetzt werden.
Bisherige `AllowedClients`/`DeniedClients`-Regeln werden weiterhin angewandt; diese dürfen die zwei offiziellen Viewer nicht zusätzlich ungewollt ausschließen. Die bestehende OGL Viewer Advisor-Empfehlung ist unabhängig davon und bleibt deaktiviert.
Bisherige `AllowedClients`/`DeniedClients`-Regeln werden weiterhin angewandt; diese dürfen die drei zugelassenen Viewer nicht zusätzlich ungewollt ausschließen. Die bestehende OGL Viewer Advisor-Empfehlung ist unabhängig davon und bleibt deaktiviert.
## Hypergrid und Marketplace bleiben offen
@@ -39,7 +40,7 @@ OutboundPermission = true
DisallowAllExport = false
```
Berechtigte ausländische Gäste mit Firestorm/OpenGenesisLINK können Gegenstände kaufen, in ihr eigenes Inventar übertragen, heimreisen und sie im Rahmen der üblichen Objektberechtigungen aufstellen. Die HG-Asset-Endpunkte bleiben für autorisierte Transaktionen offen. Die Begrenzung großer Asset-Existenzabfragen aus PR #330 bleibt erhalten.
Berechtigte ausländische Gäste mit einem zugelassenen Viewer können Gegenstände kaufen, in ihr eigenes Inventar übertragen, heimreisen und sie im Rahmen der üblichen Objektberechtigungen aufstellen. Die HG-Asset-Endpunkte bleiben für autorisierte Transaktionen offen. Die Begrenzung großer Asset-Existenzabfragen aus PR #330 bleibt erhalten.
## Sicherheitsgrenze (verpflichtend klar kommunizieren)
@@ -0,0 +1,65 @@
# OpenGenesisLINK Generation 1: wolfvoice 0.2.0 (optionaler Backend-Modus)
## Status und Abgrenzung
wolfvoice ist ein **separater Rust-Medienserver**, nicht einfach eine austauschbare OGLVoice-URL. Seine Firestorm-CAPS kommen zwingend aus dem **gehärteten os-webrtc-janus-Regionsaddon**. wolfvoice spricht dessen JSON-RPC, SDP, DTLS/SRTP und LL-WebRTC-Datachannel; der vorhandene OGLVoice/LiveKit-Media-Exchange in NexVerse benutzt dagegen einen anderen Authentisierungs- und Signalisierungsvertrag. **Nicht einfach MediaGatewayUrl auf wolfvoice zeigen.**
Diese Integration liefert ein **reproduzierbares opt-in Modul-Build**, ein **sicherheitsgeprüftes Aktivierungs-Skript für einen Simulator** und Konfliktvermeidung für die Viewer-CAPS. Nichts wird automatisch auf produktiven Servern installiert, gestartet oder umgeschaltet. Die Quelltexte von wolfvoice und os-webrtc-janus werden **nicht** ungeprüft in den NexVerse-Quellbaum kopiert oder als Docker-Container gestartet.
Quellen / feste Revisionsstände:
- [wolfvoice](https://github.com/intelligentwolf/wolfvoice), main-Commit `f13ce3c462fd9524e2b3a89f897f7a034357c03d`, Cargo version 0.2.0, Apache-2.0.
- [gehärtetes Regionsaddon](https://github.com/intelligentwolf/os-webrtc-janus/tree/chatsession-p2p-session-id-and-fast-fail), Commit `7f08ce453fc5938beea12c452348d46b3ed1088e`, zwingend für authentifizierten Wolfvoice-Betrieb. Externe Lizenz beachten.
## Installation auf einer isolierten Generation-1-Entwicklungsregion
1. Auf einem **separaten Voice-Host** wolfvoice 0.2.0 aus geprüftem Quellstand bereitstellen, TLS-Zertifikat für öffentliche DNS-Adresse, extern UDP **40000–40999**, JSON-RPC TCP **9443 nur für Regionshosts**; **nie** RPC-Schlüssel an Viewer ausgeben. Vor Ausführung das externe `setup.sh` des Projekts prüfen.
2. **Zwei unabhängige Schlüssel** serverseitig erzeugen: `rpc_key` (Relay-Authentisierung) und `cred_key` (Tickets). Auf Voice-Host `/etc/wolfvoice/`, auf jedem Regionenhost z. B. `/etc/opensim/voice_rpc_key` und `/etc/opensim/voice_cred_key` für die OpenSim-Serviceidentität nur lesbar bereitstellen (Dateimodus 0400). Nicht in GitHub, INI, Log, Issue oder Chat veröffentlichen.
3. Im NexVerse-Quellbaum (mit vollständiger Quelle, `dotnet`, `git` und `bin/prebuild.dll`):
```bash
bash tools/voice/install-wolfvoice-region-addon.sh fetch
bash tools/voice/install-wolfvoice-region-addon.sh build
```
Das Skript benutzt `addon-modules/os-webrtc-janus` und den **festen** gehärteten Revision-Stand. Ein bereits abweichender oder lokal modifizierter Checkout wird **nicht** überschrieben. Das standardmäßige `prebuild.xml` in NexVerse schließt `addon-modules/*/prebuild*.xml` automatisch ein. Erforderliche Ausgabedateien: `bin/WebRtcVoice.dll`, `bin/WebRtcVoiceServiceModule.dll`, `bin/WebRtcVoiceRegionModule.dll`.
4. Nach Bereitstellung von Voice-Host und Schlüsseln für den gewählten **Staging-Simulatorprozess**:
```bash
bash tools/voice/configure-wolfvoice-region.sh https://voice.example.org:9443
```
`voice.example.org` **durch den eigenen TLS-Host ersetzen**. Das Skript verweigert den Platzhalter und fehlende DLLs/Schlüssel; es schreibt ausschließlich die neue `bin/config/wolfvoice.ini` und überschreibt keine vorhandene Datei. Dabei wird `[OGLVoiceViewer] Enabled=false` gesetzt, um konkurrierende Firestorm-CAPS zu verhindern. `[WebRtcVoice] Enabled=true` schaltet die gehärtete Regionserweiterung ein. Legacy Vivox wird abgeschaltet. Nach Prüfungen **diesen** Simulator geordnet neu starten.
5. Estate und Parzelle **Allow Voice Chat** aktivieren. Mit Firestorm **7.1.10 oder neuer** (vorzugsweise aktueller Build) auf Staging testen: lokale Voice-Sitzung, Teilnehmerliste, positionsabhängiges Hören, Sprach-Mute, Regionwechsel, P2P-Text-IM und Gruppenruf. Die WebRTC-IM-CAPS des gehärteten Moduls sind wichtig, weil sonst P2P-Textnachrichten in kompatiblen Viewern blockieren können.
Ein Simulatorprozess kann mehrere Regionen hosten; in dem Fall wirkt `[WebRtcVoice]` auf alle Regionen im Prozess. Das Ziel ist ein bewusstes **entweder Wolfvoice oder OGLVoice** je Simulatorprozess, kein paralleler Betrieb zweier CAPS-Anbieter für denselben Viewer.
## Konfiguration nach dem Setup-Skript
```ini
[OGLVoiceViewer]
Enabled = false
[WebRtcVoice]
Enabled = true
SpatialVoiceService = WebRtcVoice.dll:WebRtcVoiceServiceConnector
NonSpatialVoiceService = WebRtcVoice.dll:WebRtcVoiceServiceConnector
WebRtcVoiceServerURI = https://MEIN-VOICE-HOST:9443
RpcKeyFile = /etc/opensim/voice_rpc_key
CredKeyFile = /etc/opensim/voice_cred_key
PositionFeed = true
MessageDetails = false
AcceptLegacyCallCredentials = false
[VivoxVoice]
enabled = false
```
Diese Dateien müssen nach einem Update auf dem **laufenden** Simulator landen. Die beiden Schlüssel dürfen ausschließlich vom Regionsprozess lesbar sein. Die bestehende ROBUST-Verwaltung wird **nicht** auf wolfvoice umkonfiguriert.
## Betrieb, Status und Sicherheitsgrenzen
- Der Voice-Host antwortet ohne Relay-Schlüssel auf `https://MEIN-VOICE-HOST:9443/` lediglich mit `ok`. Die Regionshosts senden Authentisierungsheader zum eigentlichen Voice-Service; die Schlüssel gehören niemals in öffentliche Frontends.
- Bei Störung von wolfvoice bleibt der Simulator erreichbar, aber WebRTC-Sprachverbindungen scheitern. Bei IPv4/IPv6, NAT und Firewalls müssen die UDP-Medienports erreichbar sein.
- **Radegast-ng** ist durch die neue Viewer-Zulassung für **Login/Chat** erlaubt. Ob genau diese Radegast-ng-Version selbst den LL-WebRTC-Webclient beherrscht, ist getrennt zu testen; allein eine Viewer-Zulassung aktiviert kein Mikrofon.
- Das separate OGLVoice/LiveKit-Backend bleibt unangetastet; Wolfvoice ist **kein LiveKit-Ersatz über eine OGLVoice-URL**.
- End-to-end-Voice mit echten Firestorm-Clients, externem Rust-Medienserver und Netztransport ist **nicht durch den .NET-Gesamtbuild bewiesen** und benötigt eine Staging-Abnahme auf einem echten Regionshost.
## Rücknahme
`bin/config/wolfvoice.ini` im betroffenen Staging-Simulator entfernen bzw. `[WebRtcVoice] Enabled=false` setzen. Danach für die vorherige OGLVoice-Konfiguration `[OGLVoiceViewer] Enabled=true` oder bisherigen Default wiederherstellen und den Simulator neu starten. Die externen, lokal nicht versionierten Addon-Dateien und Schlüssel **nicht blind löschen**, wenn andere Regionen sie verwenden.
@@ -28,6 +28,14 @@ internal static class Program
Check("1.0.0", "OGL Viewer-Release", true);
Check("OpenGenesisLINK-Release", null, true);
// Radegast-ng reports its channel in different forms across builds.
Check("Radegast-ng 2.3", "Radegast-ng", true);
Check("Radegast-ng", "", true);
Check("2.3.0", "Radegast-ng", true);
Check("Radegast 2.3", "Radegast", true);
Check("2.3.0", "Radegast", true);
Check("Radegast-ng-malice", "Hydrastorm", false);
// Denials: explicit known Copybot labels and every other viewer family.
Check("Darkstorm 2.0", "Darkstorm", false);
Check("Hydrastorm 1.0", "Hydrastorm", false);
@@ -16,7 +16,7 @@ def section(data, name):
policy = read("OpenSim/Framework/OglApprovedViewerPolicy.cs")
for marker in (
'"Firestorm", "OpenGenesisLINK", "OGL Viewer"',
'"Firestorm", "OpenGenesisLINK", "OGL Viewer", "Radegast-ng", "Radegast"',
'"Darkstorm", "Hydrastorm", "Copybot"',
"StartsWithApprovedName",
"ContainsKnownCopybotName",
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env python3
"""Regression guard for NexVerse NodeAgent close/inbound HTTP race."""
from pathlib import Path
root = Path(__file__).resolve().parents[2]
src = (root / "NexVerse/RegionModules/NodeAgent/NexVerseNodeAgentModule.cs").read_text(encoding="utf-8-sig")
start = src.index(" private void HandleInbound(")
end = src.index(" private static void WriteInbound(", start)
handler = src[start:end]
close = src.split(" public void Close()",1)[1].split(" public IDisposable Subscribe(",1)[0]
assert "private int m_Stopping;" in src
assert "Interlocked.Exchange(ref m_Stopping, 1)" in close
assert close.index("Interlocked.Exchange(ref m_Stopping, 1)") < close.index("m_Bus?.Dispose()")
assert 'Volatile.Read(ref m_Stopping) != 0 || !m_Enabled' in handler
assert 'DistributedNexEventBus bus = m_Bus;' in handler
assert 'Volatile.Read(ref m_Stopping) != 0 || bus == null' in handler
assert "bool accepted = bus.Receive(nexEvent);" in handler
assert "catch (ObjectDisposedException)" in handler
assert "HttpStatusCode.ServiceUnavailable" in handler
assert 'new { error = "node_shutting_down" }' in handler
receive_tail = handler.split("bool accepted = bus.Receive(nexEvent);", 1)[1]
assert receive_tail.index("catch (ObjectDisposedException)") < receive_tail.index("catch (Exception e)")
assert "NexBusProtocol.Verify(" in handler
assert handler.index("NexBusProtocol.Verify(") < handler.index("bus.Receive(nexEvent)")
assert 'HttpStatusCode.Unauthorized' in handler
print("NodeAgent shutdown: early 503, safe in-flight Receive, HMAC preserved")
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/env python3
"""Static checks for opt-in wolfvoice integration and Radegast-ng policy."""
from pathlib import Path
root = Path(__file__).resolve().parents[2]
def read(p):
return (root / p).read_text(encoding="utf-8-sig")
policy = read("OpenSim/Framework/OglApprovedViewerPolicy.cs")
tests = read("tools/ci/OglApprovedViewerRegression/Program.cs")
verify = read("tools/ci/verify_gen1_approved_viewer_access.py")
for item in ('"Firestorm"', '"OpenGenesisLINK"', '"OGL Viewer"',
'"Radegast-ng"', '"Radegast"'):
assert item in policy
assert "Check(\"Radegast-ng\", \"\", true);" in tests
assert "Check(\"2.3.0\", \"Radegast\", true);" in tests
assert "Radegast-ng" in verify
install = read("tools/voice/install-wolfvoice-region-addon.sh")
configure = read("tools/voice/configure-wolfvoice-region.sh")
doc = read("doc/NexVerse/GEN1_WOLFVOICE_COMPATIBILITY.md")
assert '7f08ce453fc5938beea12c452348d46b3ed1088e' in install
assert "intelligentwolf/os-webrtc-janus.git" in install
assert "git clone --no-checkout" in install
assert 'git -C "$ADDON_DIR" checkout --detach "$SOURCE_COMMIT"' in install
assert 'git -C "$ADDON_DIR" status --porcelain' in install
assert './runprebuild.sh' in install
assert "dotnet build --configuration Release OpenSim.sln" in install
for dll in ("WebRtcVoice.dll", "WebRtcVoiceRegionModule.dll", "WebRtcVoiceServiceModule.dll"):
assert dll in install and dll in configure, dll
for marker in (
"[OGLVoiceViewer]", "Enabled = false",
"[WebRtcVoice]", "Enabled = true",
"WebRtcVoice.dll:WebRtcVoiceServiceConnector",
"RpcKeyFile = $RPC_KEY", "CredKeyFile = $CRED_KEY",
"MessageDetails = false", "PositionFeed = true",
"AcceptLegacyCallCredentials = false",
"[VivoxVoice]", "enabled = false",
"if [[ -e \"$TARGET\" ]]; then",
):
assert marker in configure, marker
assert "wolfvoice" in doc and "os-webrtc-janus" in doc
assert "OGLVoiceViewer" in doc
assert "/addon-modules/os-webrtc-janus/" in read(".gitignore")
assert "OglVoiceFirestormCapsModule" in read("NexVerse/RegionModules/Voice/OglVoiceFirestormCapsModule.cs")
print("Wolfvoice optional integration + Radegast-ng aliases: source pin, CAPS separation, key checks OK")
+71
View File
@@ -0,0 +1,71 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: MPL-2.0
# Opt-in configuration for one OpenGenesisLINK simulator process.
# No network downloads, no service restarts, no access to secret contents.
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
URL="${1:-}"
TARGET="${2:-$ROOT/bin/config/wolfvoice.ini}"
RPC_KEY="${WOLFVOICE_RPC_KEY_FILE:-/etc/opensim/voice_rpc_key}"
CRED_KEY="${WOLFVOICE_CRED_KEY_FILE:-/etc/opensim/voice_cred_key}"
if [[ ! "$URL" =~ ^https://[A-Za-z0-9][A-Za-z0-9.-]*(:[0-9]{1,5})?/?$ ]]; then
echo "Usage: $0 https://voice.example.org:9443 [target/wolfvoice.ini]" >&2
echo "Requires HTTPS with a matching, publicly verifiable certificate." >&2
exit 2
fi
if [[ "$URL" == *example.* ]]; then
echo "Replace the example host with the real wolfvoice TLS hostname." >&2
exit 2
fi
for dll in WebRtcVoice.dll WebRtcVoiceRegionModule.dll WebRtcVoiceServiceModule.dll; do
[[ -s "$ROOT/bin/$dll" ]] || {
echo "Missing addon assembly $dll; run install-wolfvoice-region-addon.sh first." >&2
exit 1
}
done
for key in "$RPC_KEY" "$CRED_KEY"; do
[[ -r "$key" && -s "$key" ]] || {
echo "Voice key not readable/empty: $key (not printing its contents)." >&2
exit 1
}
done
# No silent overwrite of an existing configured voice backend.
if [[ -e "$TARGET" ]]; then
echo "Refusing to overwrite existing voice config: $TARGET" >&2
exit 1
fi
mkdir -p "$(dirname "$TARGET")"
umask 027
cat > "$TARGET" <<EOF
; OpenGenesisLINK Generation 1 - wolfvoice spatial backend (opt-in).
; Hardened os-webrtc-janus addon required; ensure voice allowed on estate/parcel.
; This affects every region hosted by this simulator process.
[OGLVoiceViewer]
; The built-in OGLVoice and wolfvoice addons MUST NOT both own Firestorm CAPS.
Enabled = false
[WebRtcVoice]
Enabled = true
SpatialVoiceService = WebRtcVoice.dll:WebRtcVoiceServiceConnector
NonSpatialVoiceService = WebRtcVoice.dll:WebRtcVoiceServiceConnector
WebRtcVoiceServerURI = $URL
RpcKeyFile = $RPC_KEY
CredKeyFile = $CRED_KEY
PositionFeed = true
MessageDetails = false
AcceptLegacyCallCredentials = false
StunServers = stun:stun.l.google.com:19302,stun:stun1.l.google.com:19302
[VivoxVoice]
enabled = false
EOF
echo "Wrote $TARGET without embedding key contents."
echo "Check HTTPS, TCP 9443 (region hosts only), UDP 40000-40999, and estate/parcel voice flags."
echo "Restart this simulator only when ready; no server was restarted by this script."
@@ -0,0 +1,79 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: MPL-2.0
# Optional, operator-triggered OpenGenesisLINK / wolfvoice integration.
# Pins the hardened os-webrtc-janus region addon; never installs the Rust
# voice server or modifies a running region without explicit operator action.
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
ADDON_DIR="$ROOT/addon-modules/os-webrtc-janus"
SOURCE_REPO="https://github.com/intelligentwolf/os-webrtc-janus.git"
SOURCE_COMMIT="7f08ce453fc5938beea12c452348d46b3ed1088e"
BUILD_MODE="${1:-build}"
if [[ "$BUILD_MODE" != "build" && "$BUILD_MODE" != "fetch" && "$BUILD_MODE" != "check" ]]; then
echo "Usage: bash tools/voice/install-wolfvoice-region-addon.sh [fetch|build|check]" >&2
exit 2
fi
cd "$ROOT"
for bin in git dotnet; do
command -v "$bin" >/dev/null || { echo "Missing prerequisite: $bin" >&2; exit 1; }
done
# This repository includes add-ons via addon-modules/*/prebuild*.xml.
# A second in-tree copy would produce conflicting projects/cap handlers.
if [[ -d OpenSim/Addons/os-webrtc-janus || -d Addons/os-webrtc-janus ]]; then
echo "Conflicting in-tree os-webrtc-janus found; refusing duplicate addon." >&2
exit 1
fi
if [[ -e "$ADDON_DIR" ]]; then
if [[ ! -d "$ADDON_DIR/.git" ]]; then
echo "Existing addon directory is not a Git checkout: $ADDON_DIR" >&2
exit 1
fi
current="$(git -C "$ADDON_DIR" rev-parse HEAD)"
if [[ "$current" != "$SOURCE_COMMIT" ]]; then
echo "Existing addon has unexpected revision $current; do not overwrite it." >&2
exit 1
fi
if [[ -n "$(git -C "$ADDON_DIR" status --porcelain)" ]]; then
echo "Addon checkout has local changes; refusing to continue." >&2
exit 1
fi
elif [[ "$BUILD_MODE" == "check" ]]; then
echo "Addon not fetched: $ADDON_DIR" >&2
exit 1
else
echo "Fetching pinned hardened addon $SOURCE_COMMIT ..."
git clone --no-checkout "$SOURCE_REPO" "$ADDON_DIR"
git -C "$ADDON_DIR" checkout --detach "$SOURCE_COMMIT"
fi
for file in prebuild-webrtc.xml prebuild-regionmodule.xml prebuild-servicemodule.xml; do
test -f "$ADDON_DIR/$file" || { echo "Missing $file" >&2; exit 1; }
done
if [[ "$BUILD_MODE" == "fetch" ]]; then
echo "Pinned wolfvoice region addon fetched, not built."
exit 0
fi
if [[ "$BUILD_MODE" == "build" ]]; then
# Regen solution locally; this can touch generated .csproj/.sln files.
# Operator must review 'git status' before committing anything.
./runprebuild.sh
dotnet build --configuration Release OpenSim.sln
fi
for dll in WebRtcVoice.dll WebRtcVoiceRegionModule.dll WebRtcVoiceServiceModule.dll; do
test -s "$ROOT/bin/$dll" || {
echo "Missing $ROOT/bin/$dll; addon was not built successfully." >&2
exit 1
}
done
echo "wolfvoice region addon ready at pinned revision $SOURCE_COMMIT."
echo "Only activate after checking TLS, voice keys, and OGLVoiceViewer conflicts."
echo "Next: bash tools/voice/configure-wolfvoice-region.sh https://VOICE-HOST:9443"