Vendored third-party code
tsclientlib/
- Upstream: https://github.com/ReSpeak/tsclientlib, crate
tsclientlib/at revisionee3bc6f45a7137db7793ba5593a321df400d53e5(2026-07-22, "Fix pulling partial packets from AudioQueue"). - Authors: Flakebi and the ReSpeak contributors.
- License: dual MIT OR Apache-2.0 — see
tsclientlib/LICENSE-MITandtsclientlib/LICENSE-APACHE(copied verbatim from the upstream repository root). tsclientlibandtsprotoare vendored from that revision.ts-bookkeeping,tsproto-packetsandtsproto-typesremain pinned git dependencies. The root workspace patch selects the localtsprotofor every consumer.
Local modifications
tsclientlib.patch records the original protocol-discovery modifications (items 1–5 below).
The native capture-send extension in item 6 and tsproto/ is maintained directly in the vendored tree;
the historical patch alone no longer reproduces the complete tree.
-
Cargo.toml: the workspacepathdependencies are replaced by git dependencies pinned to the same revision. -
src/lib.rs: newStreamItem::UnknownCommand(InCommandBuf). Upstream parses every incoming command intoInMessageand drops (with a warning) commands it has no declaration for. The TeamSpeak 6 screen-share signalling (notifystream*,notifyjoinstreamrequest,notifyrespondjoinstreamrequest,notifysfuaccessinfo) is such a family, so the patch hands those packets to the application unparsed instead of dropping them. -
src/lib.rs: opt-inConnectOptions::raw_command_tap(fn(&[u8]) -> bool)andStreamItem::RawCommandCopy(Vec<u8>): a copy of each incoming command whose name the predicate selects, emitted before normal processing. Used to read arguments the book does not store (channel banners, TeamSpeak 6client_is_streaming). Off by default.initserveris consumed while connecting, before that processing runs; the connect future therefore also returns its raw content (type Established), which is copied once the connection is established if the predicate selectsinitserver(needed forvirtualserver_capability_extensions, which the book drops). -
src/sync.rs:SyncStreamItemmirrors the two new variants so the crate keeps compiling. -
src/lib.rs:ConnectOptions::automatic_identity_level(bool), enabled by default to retain upstream behaviour. TeamsPeach disables it so a server-requested level returnsIdentityLevelinstead of spawning upstream's unbounded proof-of-work thread. The explicit identity CLI owns bounded, cancellable work and durable checkpoints. -
src/lib.rs:AudioSendMetadata,AudioSendGuardandsend_audio_guardedforward original capture time, connection generation and privacy epoch to the transport. Ordinarysend_audioremains for non-capture end markers and existing third-party callers.
tsproto/
Same upstream revision and dual MIT OR Apache-2.0 license; license texts accompany the crate. Sibling workspace dependencies are pinned to the revision above. Guarded voice packets retain metadata plus a shared authorization guard through the deferred UDP queue. Before each actual socket send attempt, including a retry after backpressure, the guard synchronizes against capture invalidation and refuses expired or revoked packets. Guarded media is bounded separately from unmodified acknowledgement/control/end-marker traffic. This prevents muted or previous-session audio from escaping merely because it was encoded before a privacy boundary.