Commit Graph
13 Commits
Author SHA1 Message Date
faumarayandClaude Sonnet 5.5 6e774873bf Document how CI and the release builds read the private VoelinProtocol repository
docs/ci.md gets a "VoelinProtocol access" section: why every cargo command
needs the access (Cargo resolves the whole workspace, so the gateway image
needs it too), the deploy key and the repository secret
VOELIN_PROTOCOL_DEPLOY_KEY, what the checks action, the release workflow and
the Dockerfiles do with it, why Cargo is told to use the system git, the
committed host key line with its fingerprint and the two commands that
re-check it, the effect on fork pull requests, and what each failure message
means. The runner setup no longer says that a fresh checkout does not build
there. docs/building.md says that the Docker builds need an ssh-agent with a
key that can read VoelinProtocol (--ssh default) and summarises the CI setup;
the plain docker build commands in it and in docs/gateway-admin.md gain
--ssh default, without which they would now stop at the cargo step.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 13:44:44 +03: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 47f5e2d9aa review: fix what the review of the gateway, avatar and banner changes found
- voelinctl observes with the new gateway list and checks avatar hashes
  only when they are MD5s (a myTeamSpeak avatar's hash is its link).
- Gateway discovery keeps to the most specific name that publishes a
  record; another server's gateway is no fallback. The admin guide says so.
- The observer's resync keeps the avatars clientlist does not tell
  (they come with the enter and update notifications).
- A server avatar given up on counts for that picture only: a new one is
  tried again, and one that arrives after all is shown again.
- updatemytsdata goes again after tsclientlib reconnects (the server
  forgets it), and once, not twice, when signing in.
- SVG is told by its prolog: a page with an svg in it (HTML, XHTML) is a
  page, refused and logged as one; the UI tells it the same way.
- Cursors (CUR) are no longer taken for pictures; MP4 and MOV are named
  videos, not AVIF.
- The UI decodes at most 128 MiB of pixels on its thread, drops the full
  picture before copying the small one, logs what it cannot decode, and
  remembers pictures it cannot show instead of decoding them on every
  refresh; a banner that reloads unchanged is not decoded again.
- The early refusal of a long error page is tested again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
2026-10-05 23:09:34 +00:00
Claude f9243d3cad gateway: try every published gateway in turn
Discovery returns every gateway the server publishes, best first: the
most specific name, at a name _tsgws before _tsgw, by priority, then
tsgw's own /.well-known answer (only when a plain record or nothing is
published, so a TLS-only server is never reached without TLS). The
engine tries them in turn, each for up to 20 s, and uses the first that
logs in; only a round that fails waits before the next. The bookmark
keeps the published list and the one in use.

A TLS proxy that answers 404 (Zoraxy without a rule for the host) no
longer keeps the gateway away when tsgw's plain port is published too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
2026-10-05 21:48:47 +00:00
Claude 266148d9cd gateway: invisible to users, and tried again when away
Users never hear of the gateway:
- relayed messages look like everyone else's (no "via relay", no accent
  colour) and group with the author's other messages;
- a gateway that cannot be reached or drops is tried again by itself
  (after 2, 5, 15, 30, then every 60 s) with the open chats opened again
  and messages written meanwhile sent, instead of a WebSocket error
  ("connection refused") on screen; it is logged with its URL, once per
  cause;
- a server whose gateway is away is offline, not connecting, so it can
  always be joined;
- failed requests the app made by itself are quiet; what the user did and
  failed is told in plain words; query relay errors are logged;
- no status line about a found gateway; events and streams texts do not
  mention it.

The gateway is looked up once per run even when one is stored: what the
server publishes takes the place of a stored URL (one that moved, or one
typed into an older version that showed the field, which cannot be
edited any more).

The admin guide says a _tsgws record must point at TLS, not at tsgw's own
plain port.

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 60b8e95661 ui: servers observe on selection; no gateway or query fields
Selecting a server (or saving one) observes it invisibly through its
gateway, else a query login an older version stored; without a gateway it
is looked up from the address (SRV, then /.well-known/tsgw) and observing
starts once found. The Observe button and the menu entry are gone.

The add/edit server dialog no longer asks for a gateway URL or ServerQuery
login: Advanced keeps the name and nickname. A new address drops the
gateway and query login of the old server, so they are looked up again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
2026-10-04 21:10:59 +00:00
Claude 4d04c992a3 relay: post under the author's own nickname
A relay (and the gateway's lookup session, for server chat) takes the
author's nickname for each post, sends the text as written and takes its
own name back, so messages read as written by the user in TeamSpeak.
While someone has the nickname it uses Nick1 to Nick3, as TeamSpeak names
a second client of the same name; relay.format ([Nick] text) is only the
fallback when it can take none of them. Posts through one session are
serialized, since each borrows a nickname.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
2026-10-04 21:00:38 +00:00
selikhovandClaude Opus 5.5 559ec01fee Reach wss:// gateways: TLS in the gateway client
The gateway client was built without TLS, so every wss:// gateway, the
setup docs/gateway-admin.md recommends and what a _tsgws._tcp record
names, failed with "TLS support not compiled in". tokio-tungstenite now
uses rustls with the system's certificates; rustls and its crates were
in the tree already (reqwest), so nothing new is downloaded.

Checked end to end against the TeamSpeak 6 dev server: tsgw behind a
TLS terminator with a certificate from a throwaway CA, the login over
wss:// works when the CA is trusted (SSL_CERT_FILE) and is refused with
UnknownIssuer when it is not. Android has no system store to read, so
wss:// stays out of reach there; the docs say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 03:25:24 +03:00
selikhovandClaude Opus 5.5 5aea8ef673 Find a server's gateway in DNS, like TeamSpeak finds the server
Users should not have to type a gateway URL: a server added by its address
should bring its tsgw along, the way TeamSpeak finds the voice server with
SRV _ts3._udp and TSDNS. voelin_core::discover::gateway looks at the
address's host and then each parent domain down to the registered domain,
the most specific first, for SRV _tsgws._tcp (wss) and _tsgw._tcp (ws)
records, TLS first at the same name, with the path from an optional TXT
record ("path=/v1" by default).

Without records, as TSDNS has its port 41144, the gateway itself is asked
on tsgw's default port: tsgw now answers GET /.well-known/tsgw with the URL
apps should use (listen.public_url, else the address the request came in
on), so a tsgw next to the server is found with no setup at all.

docs/gateway-admin.md says which records to publish, with examples. The
DNS lookups are injectable in the module: tests with fake SRV/TXT answers
and a local responder; the gateway's own test fetches the well-known URL
from the real router and logs in there. hickory-resolver is the version
the voice resolver already uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 23:24:57 +03:00
Claude 8e02b0ef36 Docs: gateway runtime configuration, permission rules and protocol
gateway-admin.md explains bootstrap keys versus seeds, the precedence
(runtime > --set > environment > file > default), reloading, every key,
the admin commands, permission rules with their defaults and the data
the database keeps. The history retention default is now to keep
messages; the doc says how to get the old 30 days back.

gateway-protocol.md is the reference of tsgw.v1+json with the new
messages. The example config marks bootstrap keys and lists the seeds.
The systemd unit reloads with SIGHUP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-27 18:41:25 +00:00
Claude ede6901d5e CI: fast checks only; packages are built by a release workflow
ci.yml (pushes to main, PRs) now runs only the quick checks: fmt +
clippy, the Linux tests (Xvfb), clippy for Windows (MSVC) and for
Android, cargo-deny, the notices check, and the TS3/TS6 smoke and
browser interop tests. It skips documentation-only changes (except
THIRD_PARTY_NOTICES.md, which is compiled in) and can be called by
other workflows.

The new release.yml builds the packages: on a v* tag it runs the same
checks (through ci.yml) plus the Windows tests and every package job
(Linux .tar.gz/.deb for the app and tsgw, Windows zip + installer,
Flatpak, Android APKs, the tsgw image) and attaches them with
SHA256SUMS to a draft release; run by hand it only uploads the
packages as artifacts. docker.yml runs on tags and by hand instead of
on PRs, pushes and weekly.

scripts/own-crates.sh also recognizes crates/proto with Windows path
separators, so Windows clippy covers our crates only (checked locally
with clippy for x86_64-pc-windows-gnu: clean). Docs follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-26 22:14:25 +00:00
Claude e050148a32 Rename the project to Voelin; packages hold only the app, tsgw is a Linux server package
The product is Voelin (app id io.github.faumaray.Voelin), everywhere:
- crates tsc-* -> voelin-* (and voelin-fuzz), the desktop binary
  tsc-desktop -> voelin, the development CLI tsctl -> voelinctl;
- the Android app: applicationId, Kotlin package io.github.faumaray.voelin,
  VoelinApp, libvoelin_android.so (JNI class names follow);
- TSC_* environment variables -> VOELIN_*, Gradle properties tsc.* ->
  voelin.*, signing secrets VOELIN_SIGNING_*;
- the data/config/cache/state folder tsc -> voelin, the keyring service,
  thread names, the dev compose project;
- desktop file, metainfo, icon, Flatpak manifest, NSIS installer, docs.
The gateway keeps its name: bin tsgw (crate voelin-gateway), TSGW_* env
vars, the tsgw.v1+json protocol, the tsgw image. The window title and the
About page show "Voelin <version>" from voelin_platform::APP_NAME.

Packages (scripts/package.sh): the app only (voelin, voelin.exe, APKs,
Flatpak). voelinctl is a development tool and in no package. tsgw is for
servers and now its own Linux package, tsgw_<v>_amd64.deb and
tsgw-<v>-linux-x86_64.tar.gz, with a sandboxed systemd unit
(packaging/linux/tsgw.service; /etc/tsgw config, /var/lib/tsgw state) and
dependencies of its own (no GUI libraries). docs/gateway-admin.md has an
Install section.

Fixes:
- package-windows: makensis on Windows found no file through "D:/a/..."
  paths; pass Windows paths (cygpath -w).
- StartupWMClass is the app id, which the app sets as its X11 WM_CLASS
  (it was the binary name, so desktops could not match the window).
- Gradle wrapper download timeout 10 s -> 60 s (slow proxies).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-26 21:11:17 +00:00
Claude 120d3dfc82 M4: tsgw gateway and tsc-gateway-proto
- tsc-gateway-proto: versioned JSON envelope (tsgw.v1+json), client and
  server messages, identity-challenge auth (ECDSA P-256 over a signed
  challenge), unique ids for TS3 (SHA-1) and TS6 (SHA-256, verified on
  6.0.0-beta13.1), hash-cash level.
- tsc-gateway (tsgw): axum WebSocket server; hub with one observer, a
  relay pool and a lookup query session; login by signature or token;
  permission mirroring via permoverview (server group/client/channel
  group/channel-client levels, skip and negate); per-user filtered
  presence (snapshot + diff deltas); channel/server chat relay with
  server-known nicknames, rate limit, idle relay teardown, pinned
  channels; SQLite tokens, history and audit; Dockerfile; admin guide.
- tsctl gateway client; smoke test covers gateway presence, chat both
  ways and refusal of unknown identities on TS3 and TS6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 14:30:44 +00:00