mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-02 19:42:51 +08:00
feat: customize and lock WebRTC media ports
This commit is contained in:
1 parent
767bdea018
commit
baa09ad38c
10 files changed
+161
-23
No files matched your search
@@ -24,6 +24,8 @@ test("SQLite persistence initializes schema and stores the single admin/settings
|
||||
tsPort: 9988,
|
||||
tsPasswordEncrypted: "v1:ciphertext",
|
||||
webRtcEnabled: true,
|
||||
webRtcUdpStart: 41000,
|
||||
webRtcUdpEnd: 41099,
|
||||
});
|
||||
assert.equal(database.hasAdmin(), true);
|
||||
assert.equal(database.getAdminCredential()?.hash, credential.hash);
|
||||
@@ -39,6 +41,8 @@ test("SQLite persistence initializes schema and stores the single admin/settings
|
||||
lastTestLatencyMs: null,
|
||||
lastTestError: null,
|
||||
webRtcEnabled: true,
|
||||
webRtcUdpStart: 41000,
|
||||
webRtcUdpEnd: 41099,
|
||||
updatedAt: database.getSettings().updatedAt,
|
||||
});
|
||||
assert.equal(database.recentAudit()[0]?.event, "ADMIN_INITIALIZED");
|
||||
@@ -72,9 +76,8 @@ test("SQLite schema v1 upgrades to v3 with a migration copy", () => {
|
||||
const upgraded = new WebSpeakDatabase(dbPath);
|
||||
assert.equal(upgraded.schemaVersion, 3);
|
||||
assert.equal(upgraded.getSettings().webRtcEnabled, false);
|
||||
assert.equal("webRtcPublicHost" in upgraded.getSettings(), false);
|
||||
assert.equal("webRtcUdpStart" in upgraded.getSettings(), false);
|
||||
assert.equal("webRtcUdpEnd" in upgraded.getSettings(), false);
|
||||
assert.equal(upgraded.getSettings().webRtcUdpStart, 40000);
|
||||
assert.equal(upgraded.getSettings().webRtcUdpEnd, 40099);
|
||||
assert.equal(upgraded.listManagedInvites().length, 0);
|
||||
assert.equal(existsSync(`${dbPath}.schema-1.bak`), true);
|
||||
upgraded.close();
|
||||
|
||||
Reference in new issue
Block a user