Files
client/core/vendor

Vendored third-party code

tsclientlib/

  • Upstream: https://github.com/ReSpeak/tsclientlib, crate tsclientlib/ at revision ee3bc6f45a7137db7793ba5593a321df400d53e5 (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-MIT and tsclientlib/LICENSE-APACHE (copied verbatim from the upstream repository root).
  • tsclientlib and tsproto are vendored from that revision. ts-bookkeeping, tsproto-packets and tsproto-types remain pinned git dependencies. The root workspace patch selects the local tsproto for 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.

  1. Cargo.toml: the workspace path dependencies are replaced by git dependencies pinned to the same revision.

  2. src/lib.rs: new StreamItem::UnknownCommand(InCommandBuf). Upstream parses every incoming command into InMessage and 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.

  3. src/lib.rs: opt-in ConnectOptions::raw_command_tap(fn(&[u8]) -> bool) and StreamItem::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 6 client_is_streaming). Off by default. initserver is 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 selects initserver (needed for virtualserver_capability_extensions, which the book drops).

  4. src/sync.rs: SyncStreamItem mirrors the two new variants so the crate keeps compiling.

  5. src/lib.rs: ConnectOptions::automatic_identity_level(bool), enabled by default to retain upstream behaviour. TeamsPeach disables it so a server-requested level returns IdentityLevel instead of spawning upstream's unbounded proof-of-work thread. The explicit identity CLI owns bounded, cancellable work and durable checkpoints.

  6. src/lib.rs: AudioSendMetadata, AudioSendGuard and send_audio_guarded forward original capture time, connection generation and privacy epoch to the transport. Ordinary send_audio remains 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.