Persist client identity across sessions

Previously every connect generated a fresh tsclientlib identity, so
the server saw a new client UID each session. The connector now
accepts a saved identity via --identity and always reports the one
actually used (freshly generated or reused) back in the "connected"
event; the frontend round-trips it through localStorage so
reconnecting keeps the same UID.

Verified end-to-end against the real test server: two separate
connects with the identity carried over produced byte-identical
identity blobs.
This commit is contained in:
Moepchi committed 2026-08-02 14:29:00 +02:00
1 parent 249687d98a
commit 7217bc146a
4 files changed
+31 -2

No files matched your search

+1
View File
@@ -71,6 +71,7 @@ wss.on("connection", (socket: WebSocket) => {
serverPassword: msg.serverPassword,
channelPassword: msg.channelPassword,
defaultChannel: msg.defaultChannel,
identity: msg.identity,
};
connection = new Ts3Connection(options);
connection.onEvent((event) => socket.send(JSON.stringify(event)));