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>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-14 00:17:05 +03:00
1 parent 259bdee6e1
commit 1bee9c94e8
24 files changed
+58 -2385

No files matched your search

-1
View File
@@ -69,7 +69,6 @@ bytes = "1"
http = "1"
# Already in the app's graph (reqwest); for one_rustls_crypto_provider.
rustls = { version = "0.23", default-features = false }
voelin-myts = { path = "../voelin-myts" }
# `process`: the browser interop test drives Chromium through Node.js.
tokio = { version = "1", features = ["macros", "net", "process", "rt-multi-thread", "test-util"] }
+1 -2
View File
@@ -1105,8 +1105,7 @@ fn command_session(command: &Command) -> SessionId {
/// The app has one rustls crypto provider. With two (aws-lc-rs and ring), a
/// TLS client built without an explicit provider panics: `wss://` gateways
/// did. This test's build has the app's TLS dependencies (reqwest here,
/// tonic through the voelin-myts dev-dependency).
/// did. This test's build has the app's TLS dependencies (reqwest).
#[cfg(test)]
#[test]
fn one_rustls_crypto_provider() {
-149
View File
@@ -1,149 +0,0 @@
//! Opt-in account + isolated server interoperability check. No keys are saved.
//! Requires VOELIN_MYTS_LIVE=1, EMAIL/PASSWORD/DEVICE_ID and optional OTP under
//! the VOELIN_MYTS_ prefix; TEST_TS3/TEST_TS6 and QUERY_TS3/QUERY_TS6 give
//! loopback voice/query addresses. QUERY_PASSWORD authenticates local query.
#![cfg(not(target_os = "android"))]
use std::{sync::Arc, time::Duration};
use anyhow::{Context, Result, bail, ensure};
use tokio::{sync::broadcast, time::timeout};
use voelin_core::{Command, Engine, Event, VoiceOptions, VoiceState};
use voelin_myts::{Client, ServerIdentity};
use voelin_query::{Command as QueryCommand, QueryClient, Row};
fn env(name: &str) -> Result<String> {
std::env::var(format!("VOELIN_MYTS_{name}")).with_context(|| format!("missing {name}"))
}
async fn connected(events: &mut broadcast::Receiver<Event>, session_id: u64) -> Result<u16> {
timeout(Duration::from_secs(35), async {
loop {
match events.recv().await? {
Event::State { session, state }
if session == session_id && state.voice == VoiceState::Connected =>
{
if let Some(id) = state.own_client {
return Ok(id);
}
}
Event::Error { message, .. } => bail!("engine: {message}"),
_ => {}
}
}
})
.await?
}
async fn info(query: &QueryClient, client: u16) -> Result<Row> {
query
.send(&QueryCommand::new("clientinfo").arg("clid", client))
.await?
.into_iter()
.next()
.context("clientinfo missing")
}
async fn wait_id(query: &QueryClient, client: u16, expected: &str) -> Result<()> {
timeout(Duration::from_secs(12), async {
loop {
let row = info(query, client).await?;
if row.get("client_myteamspeak_id") == Some(expected) {
return Ok(());
}
tokio::time::sleep(Duration::from_millis(200)).await;
}
})
.await
.context("server did not report the expected myTS association")?
}
async fn server(identity: Arc<ServerIdentity>, kind: &str) -> Result<()> {
let address = env(&format!("TEST_{kind}"))?;
let query_address = env(&format!("QUERY_{kind}"))?;
// This test is deliberately limited to caller-owned loopback test servers.
ensure!(address.starts_with("127.0.0.1:"), "voice endpoint must be loopback");
ensure!(query_address.starts_with("127.0.0.1:"), "query endpoint must be loopback");
let (query, _) = QueryClient::connect(&voelin_query::Connect {
transport: if kind == "TS3" {
voelin_query::Transport::Raw
} else {
voelin_query::Transport::Ssh
},
addr: query_address,
user: "serveradmin".into(),
secret: Some(env("QUERY_PASSWORD")?),
server_id: Some(1),
server_port: None,
line: voelin_query::LineOptions { rate_limit: None, ..Default::default() },
})
.await?;
let engine = Engine::start();
let mut events = engine.subscribe();
let result = async {
engine.send(Command::SetMytsIdentity(Some(identity.clone())));
for session in 1..=2 {
engine.send(Command::ConnectVoice {
session,
options: Box::new(VoiceOptions::new(&address, format!("myts-proof-{session}"))),
});
let client = connected(&mut events, session).await?;
let row = info(&query, client).await?;
let version = voelin_core::versions::native_version()?;
ensure!(row.get("client_platform") == Some(version.get_platform()), "wrong platform");
ensure!(
row.get("client_version") == Some(version.get_version_string()),
"wrong version"
);
let metadata: serde_json::Value =
serde_json::from_str(row.get("client_meta_data").context("missing metadata")?)?;
ensure!(metadata["name"] == "Voelin", "wrong client metadata");
ensure!(metadata["platform"] == std::env::consts::OS, "wrong metadata platform");
eprintln!("{kind}: native platform/Voelin metadata passed");
wait_id(&query, client, &identity.id()).await?;
eprintln!("{kind}: signed clientinit myTS ID passed");
// Two fresh connections prove the signature is bound to each handshake.
engine.send(Command::SetMytsIdentity(None));
wait_id(&query, client, "").await?;
engine.send(Command::SetMytsIdentity(Some(identity.clone())));
wait_id(&query, client, &identity.id()).await?;
eprintln!("{kind}: live clear and reattach passed");
engine.send(Command::CloseSession { session });
}
Ok(())
}
.await;
engine.send(Command::SetMytsIdentity(None));
for session in 1..=2 {
engine.send(Command::CloseSession { session });
}
query.quit().await;
result
}
#[tokio::test(flavor = "multi_thread")]
#[ignore = "requires owner-authorized account and isolated loopback servers"]
async fn authenticated_account_and_server_lifecycle() -> Result<()> {
ensure!(env("LIVE")? == "1", "explicit live opt-in required");
let client = Client::new()?;
let login = client
.login(&env("EMAIL")?, &env("PASSWORD")?, env("OTP").ok().as_deref(), &env("DEVICE_ID")?)
.await?;
// Capture every result before deleting the newly created remote session.
let result = async {
client.validate_session(&login.token).await?;
let identity = Arc::new(login.identity.context("server identity unlock failed")?);
let mut failures = Vec::new();
for kind in ["TS3", "TS6"] {
if let Err(error) = server(identity.clone(), kind).await {
failures.push(format!("{kind}: {error:#}"));
}
}
ensure!(failures.is_empty(), "{}", failures.join("; "));
Ok(())
}
.await;
let logout = client.logout(&login.token).await;
logout.context("remote test session revocation failed")?;
result
}
-5
View File
@@ -49,7 +49,6 @@ tsclientlib = { path = "../proto/tsclientlib" }
# Desktop: the keyring for passwords, stream media with libvpx, OpenH264, X11
# and PipeWire, global hotkeys through the portal and X11.
[target.'cfg(not(target_os = "android"))'.dependencies]
voelin-myts = { path = "../voelin-myts" }
# winit's focus events (an unstable API, so this minor version only):
# messages are read only while the window has the focus (`app::watch_focus`).
slint = { version = "~1.18", features = ["renderer-software", "unstable-winit-030"] }
@@ -69,9 +68,5 @@ voelin-core = { path = "../voelin-core", default-features = false, features = ["
[build-dependencies]
slint-build = "1.18"
[dev-dependencies]
# Certificates and signatures from a synthetic root for the account tests.
voelin-myts = { path = "../voelin-myts", features = ["testing"] }
[lints]
workspace = true
-19
View File
@@ -98,9 +98,6 @@ fn default_secrets() -> Box<dyn Secrets> {
#[cfg(not(target_os = "android"))]
impl Secrets for FallbackSecrets {
fn get(&self, key: &str) -> voelin_store::Result<Option<String>> {
if key.starts_with("myts/") {
return self.keyring.get(key);
}
match self.memory.get(key)? {
Some(v) => Ok(Some(v)),
None => Ok(self.keyring.get(key).unwrap_or(None)),
@@ -108,9 +105,6 @@ impl Secrets for FallbackSecrets {
}
fn set(&self, key: &str, value: &str) -> voelin_store::Result<()> {
if key.starts_with("myts/") {
return self.keyring.set(key, value);
}
if let Err(error) = self.keyring.set(key, value) {
warn!(%error, "keyring unavailable, keeping the secret for this session only");
return self.memory.set(key, value);
@@ -119,9 +113,6 @@ impl Secrets for FallbackSecrets {
}
fn delete(&self, key: &str) -> voelin_store::Result<()> {
if key.starts_with("myts/") {
return self.keyring.delete(key);
}
let _ = self.keyring.delete(key);
self.memory.delete(key)
}
@@ -571,10 +562,6 @@ impl Models {
}
pub(crate) struct App {
#[cfg(not(target_os = "android"))]
pub runtime: tokio::runtime::Handle,
#[cfg(not(target_os = "android"))]
pub myts: crate::myts::Account,
pub ui: slint::Weak<MainWindow>,
pub store: Store,
pub secrets: Box<dyn Secrets>,
@@ -834,10 +821,6 @@ pub fn run(options: RunOptions) -> Result<()> {
let mut video = Video::new(&dir, settings.openh264);
video.set_decoder_preference(decoder_preference(&prefs));
let app = App {
#[cfg(not(target_os = "android"))]
runtime: runtime.clone(),
#[cfg(not(target_os = "android"))]
myts: crate::myts::Account::new(dir.join("account")),
ui: ui.as_weak(),
store,
// The sample data of VOELIN_DEMO_UI never reaches the system keyring.
@@ -910,8 +893,6 @@ pub fn run(options: RunOptions) -> Result<()> {
app.refresh_home();
app.refresh_notices();
app.refresh_pages();
#[cfg(not(target_os = "android"))]
app.start_myts();
if app.demo {
app.start_demo();
}
-23
View File
@@ -6,29 +6,6 @@ use crate::app::{Bridge, MainWindow, with_app};
pub(super) fn wire(ui: &MainWindow) {
let bridge = ui.global::<Bridge>();
#[cfg(not(target_os = "android"))]
{
bridge.on_myts_login(|email, password, otp| {
with_app(|app| {
app.myts_login(email.to_string(), password.to_string(), otp.to_string())
});
});
bridge.on_myts_logout(|| {
with_app(|app| app.myts_logout());
});
bridge.on_myts_dismiss(|| {
with_app(|app| app.myts_dismiss());
});
bridge.on_myts_retry(|| {
with_app(|app| app.myts_retry());
});
bridge.on_myts_portal(|action| {
with_app(|app| app.myts_portal(action));
});
bridge.on_myts_badge(|index, on| {
with_app(|app| app.myts_badge(index, on));
});
}
bridge.on_open_settings(|| {
with_app(|app| app.open_settings());
});
+1 -50
View File
@@ -84,8 +84,7 @@ use voelin_model::{
use voelin_store::{Bookmark, MessageSource};
use crate::app::{
App, Bridge, MainWindow, MobileTab, MytsBadge, Nav, Page, RecordingItem, SettingsSection,
with_app,
App, Bridge, MainWindow, MobileTab, Nav, Page, RecordingItem, SettingsSection, with_app,
};
use crate::settings::LastVoice;
@@ -197,54 +196,6 @@ pub(crate) fn start(ui: &MainWindow, switches: &Switches) -> Running {
for open in &switches.open {
let (what, arg) = open.split_once(':').unwrap_or((open.as_str(), ""));
match what {
"login" if switches.demo_ui => {
let bridge = ui.global::<Bridge>();
let mut account = bridge.get_myts();
account.available = true;
account.prompt = arg != "account";
if arg == "account" {
account.signed_in = true;
account.username = "Alex Example".into();
account.email = "alex@example.test".into();
account.uuid = "00000000-0000-0000-0000-000000000001".into();
account.myts_id = "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB".into();
account.identity_status = 1;
account.initials = "AE".into();
account.description = "Usually in the Raid channel after 8.".into();
account.member_since = "2019-03-14".into();
account.last_login = "2026-10-03".into();
let strings = |items: &[&str]| {
slint::ModelRc::new(slint::VecModel::from(
items.iter().map(|s| slint::SharedString::from(*s)).collect::<Vec<_>>(),
))
};
account.badges = strings(&["TeamSpeak 6 Beta", "Early supporter"]);
// Signed for servers: the first shown, the second not.
let badge = |name: &str, shown| MytsBadge {
name: name.into(),
shown,
can_change: true,
};
account.badge_choice = slint::ModelRc::new(slint::VecModel::from(vec![
badge("TeamSpeak 6 Beta", 1),
badge("Early supporter", 0),
]));
account.user_tag = "alex@myteamspeak.com".into();
account.devices =
strings(&["Voelin · EU · 2026-10-03", "TeamSpeak · EU · 2026-09-28"]);
nav.invoke_open_settings(SettingsSection::Account);
}
account.otp_required = arg == "otp";
account.can_forget = arg == "saved" || arg == "account";
account.status = if arg == "otp" {
3
} else if arg == "saved" {
2
} else {
0
};
bridge.set_myts(account);
}
"home" => nav.invoke_show(Page::Home),
"server" => {
nav.invoke_show(Page::Server);
+3 -10
View File
@@ -227,8 +227,7 @@ fn decode(bytes: &[u8]) -> Option<(Image, usize)> {
}
/// A picture from encoded bytes (PNG, JPEG, GIF, WebP), decoded once and
/// kept by `key`; an empty image if it cannot be decoded (remembered too,
/// until [`forget_picture`]).
/// kept by `key`; an empty image if it cannot be decoded (remembered too).
pub fn picture(key: &str, bytes: &[u8]) -> Image {
let cache_key = format!("picture:{key}");
CACHE
@@ -240,11 +239,6 @@ pub fn picture(key: &str, bytes: &[u8]) -> Image {
.unwrap_or_default()
}
/// Forget the decoded picture kept by `key` (a changed account avatar).
pub fn forget_picture(key: &str) {
CACHE.with(|c| c.borrow_mut().remove(&format!("picture:{key}")));
}
/// A Twemoji by key; an empty image if there is none.
pub fn emoji(key: &str) -> Image {
if key.is_empty() {
@@ -310,10 +304,9 @@ mod tests {
encoder.write_header().unwrap().write_image_data(&[200; 32]).unwrap();
assert_eq!(picture("test:4x2", &png).size().width, 4);
assert_eq!(picture("test:junk", b"not a picture").size().width, 0);
// Remembered: not decoded (and warned about) on every refresh.
// Remembered: not decoded (and warned about) on every refresh, even
// with bytes that would decode.
assert_eq!(picture("test:junk", &png).size().width, 0);
forget_picture("test:junk");
assert_eq!(picture("test:junk", &png).size().width, 4);
}
#[test]
-2
View File
@@ -16,8 +16,6 @@ mod inbox;
mod links;
mod members;
mod messages;
#[cfg(not(target_os = "android"))]
mod myts;
mod popout;
mod previews;
mod servers;
+1 -1
View File
@@ -13,7 +13,7 @@ use voelin_platform::logs;
/// portal's request or session object is gone before it reads the object's
/// properties, which is harmless; its errors stay.
const FILE_FILTER: &str = "warn,zbus=error,voelin=info,voelin_ui=info,voelin_core=info,voelin_media=info,\
voelin_stream=info,voelin_audio=info,voelin_store=info,voelin_myts=info,voelin_observer=info,\
voelin_stream=info,voelin_audio=info,voelin_store=info,voelin_observer=info,\
voelin_query=info,voelin_gateway_proto=info,voelin_platform=info,tsclientlib=info";
fn main() -> Result<()> {
File diff suppressed because it is too large. Load diff
-4
View File
@@ -284,9 +284,6 @@ pub struct UiSettings {
pub share: ShareDefaults,
/// Write crash reports to disk (opt-in; never uploaded).
pub crash_reports: bool,
/// "Continue without an account" was chosen on the login page: it does
/// not show at start any more (signing in clears it).
pub skip_account_prompt: bool,
/// The voice channel we were in last (Home's "Continue where you left
/// off").
pub last_voice: Option<LastVoice>,
@@ -301,7 +298,6 @@ impl Default for UiSettings {
portal_restore_token: None,
share: ShareDefaults::default(),
crash_reports: false,
skip_account_prompt: false,
last_voice: None,
}
}
+2
View File
@@ -1283,6 +1283,8 @@ export global Bridge {
// Settings pages: a section was shown (its data is loaded then).
callback settings-section(int);
in property <AccountForm> account;
// Not set in this build (see `AccountCard`): the default form is signed
// out, unavailable and without the login page.
in property <MytsForm> myts;
in property <string> primary-name: myts.signed-in || myts.restoring ? (myts.username != "" ? myts.username : myts.email) : nickname != "" ? nickname : app-name;
callback myts-dismiss();
+7 -2
View File
@@ -451,11 +451,16 @@ component SessionActions inherits HorizontalLayout {
}
// Settings → My Account.
//
// The account sign-in is not part of this build: nothing sets `Bridge.myts`,
// so it keeps its default (signed out, not available, no prompt) and the card
// shows only the note. The rest of this file stays for the account that comes
// back through the gateway.
export component AccountCard inherits Card {
title: @tr("myTeamSpeak");
icon: Icons.user;
subtitle: Bridge.myts.signed-in ? @tr("Your account") : Bridge.myts.restoring ? @tr("Checking your saved session") : @tr("Sign in to make your account your main profile");
if !Bridge.myts.available: Note { text: @tr("Account sign-in is available on desktop."); }
subtitle: !Bridge.myts.available ? "" : Bridge.myts.signed-in ? @tr("Your account") : Bridge.myts.restoring ? @tr("Checking your saved session") : @tr("Sign in to make your account your main profile");
if !Bridge.myts.available: Note { text: @tr("Account sign-in is not available in this build."); }
if Bridge.myts.signed-in || Bridge.myts.restoring: AccountProfile { }
if Bridge.myts.available && !Bridge.myts.signed-in && !Bridge.myts.restoring: LoginForm { }
if AccountText.status(Bridge.myts.status) != "" || AccountText.persistence(Bridge.myts.persistence-status) != "": AccountNotices { }