Conflicts and how they were resolved: - CHANGELOG.md: both sides' lines kept under [Unreleased], each in its section; the badges line says TeamSpeak 6's verified badges come first. - crates/proto/UPSTREAM.md: #11's myTeamSpeak presentation stays patch 15; this branch's privilege key (default_token) patch becomes 16. - voelin-core web.rs: #11's downloader (retry hints, revalidation, proxies, per-host limits) as it is. The chat pictures' size limit sits on top as web::fetch_chat_picture, which narrows #11's Limits; fetch_within takes them by value. The badge pictures go through #11's fetch like banners. - voelin-core session.rs: both sides' fields kept (chat_pictures and unfetchable). Chat pictures ([img]) are an ImageRequest of their own (ChatPicture) instead of sharing Picture with banners, so #11's banner policy (retried every 15 minutes while shown, logged by address) does not apply to them: they keep the 1, 4, 16 s retries and are checked against the size they were asked for; their failures are logged by host at debug level. Badge pictures stay Pictures next to #11's banner loop (with its unfetchable-scheme log). - voelin-ui servers.rs: #11's imports (Instant, debug) with this branch's (no SharedString). Where the two badge features meet: the presence's badges are now voelin_model::shown_badges, TeamSpeak 6's client_signed_badges (what #11 sends for our account, and other TS6 users' verified badges) first, then client_badges, each once; so the badges chosen in Settings → My Account show in the tree and on the member card like other people's. Also: docs/ui.md describes My Account's badge choice and User Tag, the new ui.image_cache_mb default (256), and the picture downloads as #11 left them (16 at once, 6 per host, 128 MiB, the new timeouts, banner and badge retries, proxies, BMP and ICO, scaling down past 4096 pixels) with the chat pictures' own retries; the demo's login:account switch fills in a badge choice and a User Tag for screenshots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
10 KiB
10 KiB
Vendored upstream: ReSpeak/tsclientlib
The crates in this directory are a vendored fork of
ReSpeak/tsclientlib, licensed
MIT OR Apache-2.0 (see LICENSE-MIT and LICENSE-APACHE in this directory).
| Item | Source |
|---|---|
| tsclientlib | ee3bc6f45a7137db7793ba5593a321df400d53e5 (master) |
tsproto-structs/declarations (was a git submodule) |
ReSpeak/tsdeclarations 83cb8a94b65021bb8ec4beb339e5bfbdd93df60f (MIT OR Apache-2.0, own LICENSE-* kept inside the directory) |
Layout mapping
| Upstream path | Here |
|---|---|
tsclientlib/ |
crates/proto/tsclientlib/ |
tsproto/ |
crates/proto/tsproto/ |
utils/ts-bookkeeping/ |
crates/proto/ts-bookkeeping/ |
utils/tsproto-packets/ |
crates/proto/tsproto-packets/ |
utils/tsproto-structs/ |
crates/proto/tsproto-structs/ (submodule flattened into plain files) |
utils/tsproto-types/ |
crates/proto/tsproto-types/ |
README.md, CHANGELOG.md, .rustfmt.toml, clippy.toml |
crates/proto/README.upstream.md, CHANGELOG.md, .rustfmt.toml, clippy.toml |
Not vendored: .appveyor/, tools/measure-latency.sh, tslientlib.code-workspace,
the upstream root Cargo.toml (replaced by this repository's workspace).
Local patches
The import commit contains the upstream files unmodified. Every later change to files in this directory is listed here, newest last, so it can be diffed against or offered back to upstream.
- Workspace integration. Path dependencies point at the flat
crates/proto/<crate>layout; every crate getspublish = false. - Replace
audiopuswithopus20.4 (tsclientlib/src/audio.rs,tsclientlib/examples/audio_utils/audio_to_ts.rs,tsclientlib/Cargo.toml).audiopusis unmaintained (RUSTSEC-2026-0150) and breaks with CMake 4. Theaudiopus-unstablefeature (decoder complexity/DRED via a fork) is dropped. - Init1 RSA puzzle off-thread (
tsproto/src/algorithms.rs,tsproto/src/client.rs,tsproto/benches/modpow.rs).solve_rsa_puzzledoes Montgomery squarings withcrypto-bigint(about 25% faster thannum-bigintmodpow) on aspawn_blockingthread that stops when the connect future is dropped. The level cap ismax_puzzle_level()(default 100 million, was a fixed 10 million), adjustable withset_max_puzzle_level, because TeamSpeak 6 adapts the level. - TeamSpeak 6 declarations (
tsproto-structs/declarations/Messages.toml,Book.toml). New fieldsclient_is_streaming(book:Client::is_streaming: Option<bool>),virtualserver_address,virtualserver_version_sign; stream notifications (notifystreamstarted,notifystreamstopped,notifystreaminfo,notifyjoinstreamrequest,notifyrespondjoinstreamrequest,notifystreamsignaling,notifystreamclientjoined,notifystreamclientleft) and commands (setupstream,stopstream,streamsignaling,respondjoinstreamrequest,removeclientfromstream). Seedocs/protocol-notes/ts6-streaming.md. curve25519-dalek-ng→curve25519-dalek4 (tsproto-types,tsproto). The-ngfork is unmaintained; the API is the same apart from the basepoint table being a reference. Verified by the license-chain unit tests and a live TeamSpeak 6 handshake.- Panics on malformed input found by fuzzing (
fuzz/):tsproto/src/license.rs: an empty license (initivexpand2 l=) indexeddata[0]; license properties indexed past the end or with start > end. All property reads are bounds-checked now.tsproto-packets/src/packets.rs: the invalid-codec error for short C2S audio packets readcontent[4]instead of the codec bytecontent[2].
- TeamSpeak 6 stream commands, verified against 6.0.0-beta13.1
(
tsproto-structs/declarations/Messages.toml). New fieldsis_removeandreason(stream leave reason). New commandjoinstreamrequest id clid msg is_remove(JoinStreamRequestRequest);stopstreamandremoveclientfromstreamtake the requiredreason;notifyjoinstreamrequestcarriesis_remove,notifystreamstoppedandnotifystreamclientleftcarryreason, the latter alsoreturn_code. - File transfer fixes (
tsclientlib/src/lib.rs, marked "Voelin patch"). A server that refusesftinitdownload/ftinitupload(file not found, no permission, quota) answers with anerrorfor the command's return code, which came out as aMessageResultthe caller cannot match to itsFiletransferHandle; it now fails the transfer (FiletransferFailed). A transfer address of0.0.0.0/::means the server's own address. The return code and transfer id counters wrap instead of overflowing. - TeamSpeak 6 times in milliseconds (
ts-bookkeeping/build/message_parser.rs, "Voelin patch"). TeamSpeak 6 sends some times, e.g.datetimeofnotifyfilelist, in milliseconds, which failed to parse and dropped the whole message (empty file lists). Values from 10^11 on (year 5138 in seconds) are taken as milliseconds. - Test logger (
tsclientlib/src/tests.rs, "Voelin patch"). The tests' shared tracing setup usedinit, which panics when quickcheck (use_logging) has already installed aloglogger; the panic poisoned theLazyand failed every later test of the binary, depending on test order. It usestry_initnow. - TSDNS without an SRV record, as the official client resolves
(
tsclientlib/src/resolver.rs). Without an SRV record at_tsdns._tcp.<domain>the official client asks a TSDNS server directly on TCP 41144 at the address's parent domains (A/AAAA DNS resolve for possible TSDNS successful, "example.com",TSDNS found at <ip>:41144 and queried successfullyin its log); upstream went straight to the address on port 9987, so servers published only through TSDNS (on another port) could not be reached without typing the port. Now: SRV_ts3._udp.<address>, then TSDNS (the servers_tsdns._tcpnames, else the ones at each parent domain down to the last two labels), then A/AAAA on 9987. The steps start at once and come out in that order; each is given up after 10 s, a TSDNS server after 3 s (connect and answer), so a port a firewall drops does not stall connecting. A port typed with the address now overrides the port of every result (the_ts3._udpone too). The TSDNS query sends the host without the port, and the answer is trimmed. SRV records of weight 0, the common weight, were dropped by the weighted ordering; they are kept now (RFC 2782 order). A CNAME among the SRV answers no longer panics. The lookups are injectable inside the module, and the tests use a fake TSDNS server and fake names; the upstream tests that need DNS and the internet are#[ignore]d. - Private keys with leading zero bytes (
tsproto-types/src/crypto.rs, "Voelin patch"). The TeamSpeak export stores the private scalar as a DER integer, which drops leading zero bytes, andEccKeyPrivP256::from_tomcrypthanded those fewer than 32 bytes tofrom_short, which refused them: one identity in 256 (the official client's ones included) could not be imported. The scalar is padded to 32 bytes now; a test round-trips such keys. - Channel banners (
tsproto-structs/declarations/Messages.toml,Book.toml). TeamSpeak 6 channels have a banner picture,channel_banner_gfx_urlandchannel_banner_mode, which its server sends inchannellist,notifychannelcreatedandnotifychanneledited(verified against 6.0.0-beta13.1; upstream declared them forchannellistonly, so creating or editing a channel logged "Unknown argument" and lost them). The book'sChannelkeeps them asbanner_gfx_urlandbanner_mode. The mode stays a string, as upstream declared it, so a value the parser does not know cannot drop the whole channel list; its numbers are those ofHostBannerMode(the server'schanneleditdocumentation: 0 as it is, 1 stretched, 2 scaled keeping the aspect ratio). - myTeamSpeak connection identity (
tsproto/src/myts.rs,tsclientlib/src/myts.rs,tsclientlib/src/lib.rs). Validated, redacted account credentials retain the original raw signing scalar and validate again when deserialized from a credential store. Connection-bound account proofs use the negotiated shared IV and the official raw-scalar signing construction, not Ed25519 seed expansion.clientinitandupdatemytsidcarry the six official case-sensitive proof fields; clearing an account sends only an emptymyTeamspeakId. Connection options retain the latest account for reconnects; callers cancel and rebuild an in-flight attempt when its snapshot changes. Tests cover an independent signature vector, persistence validation/redaction, wire field names, clearing and reconnect snapshot replacement. The account UUID and the ordinary server identity remain separate. - myTeamSpeak presentation, TeamSpeak 6 (
tsproto/src/license.rs,tsproto/src/myts.rs,tsclientlib/src/myts.rs,tsclientlib/src/lib.rs,tsproto-packets/src/packets.rs,tsproto-structs/declarations/Book.toml). License block types 4–7 (Token, License_Sign, MyTsId_Sign, Updater), which carry nothing after the header.myts::Certificatechecks a myTeamSpeak certificate chain as a TeamSpeak 6 server does: leaf type, validity window, key derived from a given root, cofactorless Ed25519 with a reduced S;Identity::id_bytesandpublic_signature_certificate.MytsDataholds the avatar and the badges, each with the certificate that verifies it, and the User Tag;MytsData::updatesbuildsupdatemytsdata(split by certificate, bare parameters to clear) andclientupdate client_user_tag, whichConnection::send_myts_updateandsend_user_tagsend. The escaped writer also escapes\aand\b, as TeamSpeak does for binary values. Book:Client::my_team_speak_avatar,my_team_speak_idandsigned_badges. - Privilege key when connecting (
tsclientlib/src/lib.rs, "Voelin patch").ConnectOptions::default_tokensetsclient_default_tokenofclientinit, which upstream always sent empty, so a privilege key (a bookmark's, or thetoken=of ats3server://link) can be used on connect.