Import identities from the official clients

Switching to Voelin should not mean starting over on every server: the unique
id is the key pair, and a user who cannot bring it along loses every server
group they have. So read the forms the official clients keep it in — the
TeamSpeak 3 `.ini` export, the `ProtobufItems` items both clients write, and
the older `Identities/<n>/…` rows — and store them through voelin-store,
skipping unique ids the store already has instead of adding a second copy.

Export back to the `.ini` form in the same module: an importer without an
exporter traps people here, which is the thing being fixed.

The clients' databases hold private keys and may be open in a running client,
so they are opened read-only and `immutable`: no lock, no shared-memory file,
no write-ahead log replay, nothing of the user's changed to read it. The cost
is that an identity written but not yet checkpointed is not seen, which is the
right way round.

Three field numbers do not earn a protobuf dependency; the wire reader is
twenty lines and skips what it does not understand. An item is taken as an
identity only when its declared type says so, never because a field number
happens to match.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Opus 5 committed 2026-09-29 13:44:41 +03:00
1 parent 840d9ce366
commit 90f234cff4
5 files changed
+671 -3

No files matched your search

+4 -3
View File
@@ -99,9 +99,10 @@ contents.
The `Checksum` row is `SHA1` over the concatenation of the other rows' `value`
blobs in ascending numeric `key` order — 20 bytes, no key, no length prefixes.
It is an integrity check the client writes, verified here only as a warning:
Voelin never writes these files, so it cannot invalidate one, and a
user-edited database with a stale checksum is still worth importing from.
It is an integrity check the client writes. Voelin does not verify it: it never
writes these files, so it cannot invalidate one, and refusing to import from a
database whose checksum a third-party tool left stale would help nobody. A key
that does not parse is rejected on its own merits.
`AccountData/Account` in the TeamSpeak 6 database is the myTeamSpeak account
record, not an identity — see [research/myteamspeak.md](research/myteamspeak.md).