Commit Graph
14 Commits
Author SHA1 Message Date
faumarayandClaude Sonnet 5.5 ff054008c3 Settle the small leftovers of the earlier reviews
CI / Linux checks (push) Failing after 20m23s
- jitter.rs: short_packet_fuzz takes payloads of 0..=100 bytes (was under
  12) and 3000 iterations (was 500).
- ui-review.md: the whisper row pointed at voelin-audio/src/encode.rs:90;
  the C2S-only packet is built by out_audio in voelin-core/src/voice.rs.
- mixer.rs: the module doc's first paragraph is reflowed, and
  Mixer::set_priority names its parameter talkers, not clients.
- stream.rs: api_types_convert_at_the_boundary asserts the remaining
  variants: every ViewerState, StreamKind (both ways) and LeaveReason
  (alone and inside EndReason::Removed).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 18:09:21 +03:00
faumarayandClaude Sonnet 5.5 1bee9c94e8 client: myTeamSpeak support leaves the client
CI / Linux checks (push) Failing after 1s
The public client repository must not carry third_party/schema-api:
TeamSpeak's non-public myTeamSpeak API protocol definitions, which came
without a licence. The account sign-in built on them (crates/voelin-myts)
goes with it, since nothing else in the client used that snapshot.

Removed: third_party/schema-api, crates/voelin-myts, the account module of
voelin-ui (sign-in, saved session, profile, avatar, badges, User Tag), the
login page at start and the live account test of voelin-core. The workspace
members, default-members and exclude lists, both manifests and Cargo.lock
no longer name them (tonic, prost-build and their dependencies drop out of
the lock file and THIRD_PARTY_NOTICES.md; about.hbs has no schema-api
section).

Settings -> My Account keeps the identity in use and shows a note that
account sign-in is not available in this build. The Slint account screens
stay, fed neutral values (Bridge.myts keeps its default: signed out, not
available, no prompt), so the account can return without redoing them. The
TeamSpeak protocol parts in tsproto/tsclientlib (myTS ID, other users'
badges and avatars) are untouched.

The account returns later through the gateway library (VoelinGateWay); the
research notes in docs/research/myteamspeak.md stay and say so. CHANGELOG,
docs/ui.md, docs/identity.md and SECURITY.md no longer describe the account
as present. A session an earlier build saved stays in the system keyring
(item myts/session) until the user deletes it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 00:17:05 +03:00
Claude 7ab43bbf60 Merge PR #11: myTeamSpeak avatar, badges and User Tag; banners; gateway speed and logs
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
2026-10-08 02:14:08 +00:00
Claude 79a12654c8 myTS avatar, badges and User Tag from a saved session; banners; gateway logs and speed
Own account on TeamSpeak 6 servers:
- With only a saved session, the account's avatar and its certificate come
  from myTeamSpeak's avatar service (requestContactsAvatar for the own myTS
  ID), the signed badges from getSignedBadges and the User Tag's token from
  /tschat requestSignedAllowedIdentifierList; no password sign-in needed.
- tsproto::myts::Certificate checks a certificate chain as the server does
  (block types 4-7, leaf type 6, validity, key from the root, cofactorless
  Ed25519); each part is sent with a certificate that verifies it, in
  separate updatemytsdata commands when they differ, and cleared on sign-out.
- client_user_tag is set as the official client sets it
  ({"myts_token","tag","updated"}) on TeamSpeak 6 servers, after a
  self-check of the token; cleared on sign-out or an account change.
- Settings -> My Account shows the User Tag and lets the user choose up to
  three badges to show. The log says what the server published.

Banners:
- The URL (without query) is logged on the first failure; stalls, connect
  failures and missing answers are named; 400/404/410 are retried after
  15 minutes, then hourly; 429/503 honour Retry-After.
- Cached pictures are revalidated (ETag, Last-Modified); at most 6
  downloads per host; a User-Agent with the app version.
- The desktop portal's proxy (Linux) and the system proxy (Windows, macOS)
  are used, SOCKS included; redirects are followed hop by hop.

Gateway, client side:
- Only a refused login stops observing; retries after 1, 2, 5, 10, 20, then
  30 s with jitter, at once when voice connects; a 30 s keepalive.
- Discovery asks DNS and the well-known endpoints at once; observing is not
  restarted when the found list still holds the gateway in use.
- Info logs for discovery, attempts (with the stage that hung), connections,
  losses and the first presence.

tsgw:
- Logging setup (log.level, log.file with size rotation, colour only on a
  terminal) and lifecycle logs: startup summary, the address the server
  sees for queries, WebSocket connections, logins, refusals, slow requests,
  ServerQuery failures, relays and the observer.
- The lookup query connection reconnects after a TeamSpeak restart; query
  connects time out after 10 s; a silent server cannot wedge a connection;
  SIGTERM, startup while TeamSpeak is down and /health are handled.
- TCP_QUICKACK and one write per line: ~45 ms -> <2 ms per SSH command.
- One flood guard shared by all query connections (9 per 3 s, SSH auth
  counted, every connection holds on a 524).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
2026-10-06 18:28:09 +00:00
Claude 259a23a165 account: show servers the account's avatar
As the official TeamSpeak 6 client does once connected and after a
sign-in, Voelin sends updatemytsdata with the account's certificate and
its avatar (LoginSession.mytsid_user_cert.cert and user_avatar, raw bytes
with TeamSpeak's escaping only; \a and \b now escaped too). The avatar
is sliced out of the login response as it came: its signature covers it.

Both come from a password sign-in; they are kept per account next to the
avatar picture (public data, outside the keyring) and published to every
voice connection that presents the account (Command::SetMytsData, beside
the identity). A refusal is only logged. Accounts signed in before need
one password sign-in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
2026-10-05 22:00:34 +00:00
Claude d114444c04 docs: UI review, and what to take from TeamSpeak 6 and Discord
A review of the desktop and phone UI (from the code and the screenshots),
the classic and TS6 client features Voelin lacks, the Discord ideas that
fit a TeamSpeak client (client-only, gateway or existing TS features), and
an order of work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
2026-10-05 20:51:06 +00:00
Claude 019f5be81c account: download the avatar from its own link
The official TS6 client fetches the avatar map's names as they are
(MyTeamSpeak::Account::request_own_myts_avatar hands each name to
Avatar_Cache::request_avatar_from_urls, which GETs it without headers).
requestAvatarSignedUrl signs upload links: its reply only goes to
upload_avatar, an Http_Client::put. Voelin fetched such a link with a GET
and was refused with HTTP 403.

A refused download is now its own error ("avatar download returned HTTP
..."), apart from the account service's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
2026-10-05 20:09:59 +00:00
Claude eafa67cfe9 streams: decode VP8 on one thread, convert pictures off the decoder
Watching was slow because FFmpeg's VP8 decoder ran on slice threads: they
split frames by token partitions, and our 4- and 8-partition streams (from
senders with 6 cores or more) took 18-21 ms per 1440p picture against 10 on
one thread, so the decoder fell behind, dropped its queue and waited for
keyframes (35-49 of 60 fps shown). VP8 now decodes on one thread.

The decode thread also converted every picture to RGBA into a new zeroed
buffer (3.6 ms at 1080p, 5.1 at 1440p). It now hands its newest frame to a
converter thread, which converts only what the window can show into
buffers reused three pictures later (0.8 and 1.0 ms).

libvpx's decoder spins its threads (4 threads: 23 and 11 fps on those
streams with a core busy, 2: 143 and 129): at most 2. dav1d with a frame
delay of one gets a quarter of the cores, 1 to 4.

docs/research/stream-fps.md has the measurements and what is left (the
sender's encode rate and bitrate, H.264 frame threads, texture uploads).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
2026-10-04 22:12:07 +00:00
Claude 7433b5a568 account: new login page, kept away while signed in; profile and avatar
The login page no longer opens when a session is saved: the session is
checked in the background and only an expired one brings the page back.
Continue without an account is remembered (ui.skip_account_prompt) until
the next sign-in.

The page is redesigned: the night artwork with what an account gives
beside the form on wide windows, the form alone on narrow ones; email,
password with a show button, the one-time code when asked, notices as
banners. Settings -> My Account shows the profile instead of a list of
notes.

voelin-myts asks the user service (/user, the route of the official
client) for getAccountData (description, registration, previous sign-in,
badges, devices, avatar file names) and requestAvatarSignedUrl, then
fetches the avatar (HTTPS only, at most 4 MiB). The UI keeps the profile
in the session's keyring bundle and the picture in <data>/account/avatar,
fetches it again only when its name changes, and uses it as the sidebar's
profile picture where a server has none for us.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
2026-10-04 22:12:07 +00:00
Claude 219e554efe versions: claim the newest signed TeamSpeak 6 build; 122 more rows
Versions.csv gains the 121 verified rows of upstream tsdeclarations it was
missing (TeamSpeak 5 betas, 3.6.x) and 6.0.0-beta4.1 [Build: 1779880475]
for Linux, captured from the official Linux client's clientinit. Every row
verifies against TeamSpeak's version-signing key. They are appended, so
the generated Version variants and the indexes keep their names.

native_version() now claims the newest 6.x build signed for the native
platform (Linux 6.0.0-beta4.1, Windows 6.0.0-beta2), so the client shows
as a TeamSpeak 6 client instead of 3.?.?; platforms without one (macOS,
Android, iOS) keep the generic tuple. --client-version generic (and a
bookmark's client_version) claims the old tuple.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
2026-10-04 21:26:15 +00:00
faumaray 24acc1910a account
Signed-off-by: Faumaray <faumaray@gmail.com>
2026-10-04 19:11:37 +03:00
selikhovandClaude Opus 5.5 f61c34b42c Find and watch streams in every channel, without a gateway
The server announces a stream only to the clients in the streamer's
channel. Voelin looked up streams that started before it joined
(`requeststreaminfo`), but only in its own channel, so a stream anywhere
else on the server appeared only through a gateway's directory. The
official client lists and joins them without one: `requeststreaminfo`
answers from any channel, and a `joinstreamrequest` from another channel
reaches the streamer (confirmed on the TS6 dev server with the probe).

- Discovery follows every streaming client on the server: it looks up
  the streams of clients in other channels as soon as they stream, keeps
  them when we or they change channels, and drops them when the streamer
  stops or leaves.
- The streams panel lists every channel's streams, ours first, the
  others with their channel ("by X · in Gaming"); clients still being
  looked up show in any channel. The viewer's note names the stream's
  channel instead of claiming it can only be watched from there.
- As a streamer with `stream.permissions = channel` (the default), our
  channel is let in and viewers from other channels are asked, as the
  setting's description ("who may watch without being asked") says;
  they were refused before.

Tested: discovery unit tests for the new rules; the engine's permission
test; the app headless (no gateway) on the TS6 dev server found and played
a stream in another channel and one that started before it joined;
scripts/it-smoke.sh gains a step where a viewer in the default channel
watches a stream in another channel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:01:10 +03:00
faumarayandClaude Opus 5 06a33a18c3 Describe where TeamSpeak keeps identities
Both official clients store identities in a `ProtobufItems` table of their
`settings.db`, not in the settings rows: one protobuf item per object, the item
type in field 6 selecting which payload field carries the body, and type 1
(field 17) holding the TeamSpeak 3 export string plus a nickname. Working that
out is the prerequisite for importing, so write it down before the code.

The myTeamSpeak account record sits in the same database and is easy to mistake
for an identity store; note that it carries no key pair and that the account
service stays out of scope, so the question is not reopened.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-29 13:36:40 +03:00
Claude 90c23362ef Find TeamSpeak 6 streams that started before we joined
The server announces a stream (notifystreamstarted) only to the clients in
the streamer's channel when it starts. A client that connects or enters the
channel later saw the streamer's client_is_streaming flag but could not
watch. The probe (docs/research/ts6-late-join.md) found that
`requeststreaminfo clid=<streamer>` answers with notifystreaminfo, one part
per stream of the client, from any channel.

voelin-stream gets a discovery module. Streams::update_clients takes the
clients on the server (channel and streaming flag), keeps the directory to
the streams in our channel, and looks up the streams of streamers in our
channel we were not told about: after connecting, after we or they change
channels, and when an announcement did not come. The answer fills the
directory like an announcement, so Event::StreamsChanged lists the stream
and it is watched like any other. Where streams are looked up is a
StreamLookup trait (the server now; a gateway directory can plug in with
Streams::add_lookup and report through Streams::discovered).
notifystreamupdated (updatestream) now updates the directory.

The engine and `voelinctl stream list/watch` feed the client list in. The
declarations learn the notifystreaminfo answer's fields, notifystreamupdated
and requeststreaminfo. Tests: a fake-server session test and an engine live
test with a viewer that arrives after the stream is live, discovery unit
tests, parsing of the server's answers; it-smoke gets a late-viewer step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-27 03:41:20 +00:00