Commit Graph

45 Commits

Author SHA1 Message Date
zarazaex69
b4dc6d2531 test: add nightly stress and churn coverage 2026-05-16 23:49:22 +03:00
zarazaex69
5347c80db5 fix(jitsi): guard reconnect counter with mutex 2026-05-16 22:24:03 +03:00
zarazaex69
f51889ac52 fix(jitsi): keep bytestream endpoints alive 2026-05-16 20:25:54 +03:00
zarazaex69
5d4592f055 fix(jitsi): reset reconnect limit by window start 2026-05-16 19:28:28 +03:00
zarazaex69
cae76a6c34 fix(jitsi): reset peer epoch before reconnect announce 2026-05-16 19:09:29 +03:00
zarazaex69
032151be98 fix(server): reset peer binding on handshake failure 2026-05-16 18:57:04 +03:00
zarazaex69
acac1121a7 fix(jitsi): add epoch-based bridge frame filtering 2026-05-16 18:46:58 +03:00
zarazaex69
07b86a7559 test(jitsi): guard session type assertions in tests 2026-05-16 18:38:14 +03:00
zarazaex69
a329b1fd56 feat(jitsi): add automatic bridge reconnection 2026-05-16 18:33:24 +03:00
zarazaex69
a321413f83 fix: golangci 2026-05-16 16:44:36 +03:00
zarazaex69
60e731c4bb fix(salutejazz): bound session close on wedged pc shutdown 2026-05-16 16:39:07 +03:00
zarazaex69
a083dfc5f3 refactor: collapse carrier layer into engine
internal/carrier and internal/carrier/builtin sat between transports and
engines, wrapping every engine.Session in carrier.Session +
engineByteStream/engineVideoTrack adapters that mechanically proxied every
method. That layer existed solely to translate Capabilities/AddTrack names;
no behaviour lived above engine.

Replace with internal/engine/builtin: a name-keyed registry that calls
auth.Issue and engine.New directly. Transports look up engine.Session via
enginebuiltin.Open, then type-assert engine.VideoTrackCapable for video
transports. A small per-transport engineVideoSession adapter unifies the
reconnect callback signature (engine uses func(*webrtc.DataChannel); the
transports want func()).

Updates:
- internal/engine/builtin/builtin.go: new Register/Open registry + auth
  pass-through ("none") + auth-driven factories for jazz/telemost/wbstream/jitsi.
- internal/transport/datachannel/transport.go: uses engine.Session directly
  via Capabilities().ByteStream check.
- internal/transport/{seichannel,videochannel,vp8channel}: each gains an
  engineVideoSession adapter and routes Connect/Send/Close/AddTrack through
  the engine session.
- internal/app/session: imports enginebuiltin; carrier.Available() →
  enginebuiltin.Available().
- pkg/olcrtc/olcrtc.go: switches to enginebuiltin.RegisterDefaults.
- internal/carrier and internal/carrier/builtin: deleted.
- Tests rewritten to register a fakeEngineSession (implements engine.Session
  + engine.VideoTrackCapable) through enginebuiltin.Register. The e2e
  memoryStream gains the same dual interface so memorySession is gone.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 14:07:44 +03:00
zarazaex69
a48db522b1 refactor(jitsi): extract peer latch helper logic 2026-05-16 05:43:36 +03:00
zarazaex69
d80d725d5e fix(jitsi): isolate bridge and video to one peer 2026-05-16 05:29:51 +03:00
zarazaex69
6222896921 refactor: improve error context and test clarity 2026-05-16 04:06:55 +03:00
zarazaex
6116130e3b Merge pull request #58 from cyber-debug/refine/livekit-reconnect
refine livekit reconnect and liveness
2026-05-16 03:47:47 +03:00
zarazaex69
4bf72e5b87 fix(salutejazz): close websocket before waiting on shutdown 2026-05-16 02:24:21 +03:00
cyber-debug
b7a7e40899 feat: add safe traffic shaping and TLS hardening 2026-05-16 02:10:34 +03:00
cyber-debug
a86f5c6948 feat: add reconnect hardening and failover profiles 2026-05-16 02:10:33 +03:00
zarazaex69
5ec58bee98 refactor: extract unstable test logging helper 2026-05-16 01:53:55 +03:00
zarazaex69
f7c157dfe3 fix(jitsi): align session close with leave flow 2026-05-16 01:09:01 +03:00
zarazaex69
0676fc2e47 fix(engine): delay session close teardown 2s 2026-05-16 00:09:41 +03:00
zarazaex69
4db4007985 fix(jitsi): wait longer after leaving MUC 2026-05-16 00:04:51 +03:00
zarazaex69
71db9c4700 fix(jitsi): start stanza drain before session accept 2026-05-15 23:41:36 +03:00
zarazaex69
6536249f72 feat: add randomID function to generate unique track and stream IDs 2026-05-15 22:00:45 +03:00
zarazaex69
bd09495e8f feat(jitsi): request video after session accept 2026-05-15 18:48:00 +03:00
zarazaex69
714d2f9f48 fix(jitsi): avoid closing session on connect failure 2026-05-15 16:55:25 +03:00
zarazaex69
e86604276d fix(jitsi): transliterate Cyrillic in sanitiseNick 2026-05-15 16:47:16 +03:00
zarazaex69
5d54209e24 fix(session): allow providers without default URL 2026-05-15 16:08:28 +03:00
zarazaex69
fa17aefe25 fix(jitsi): send jingle terminate before close 2026-05-15 15:48:48 +03:00
zarazaex69
85a3186703 refactor(jitsi): extract helpers and simplify tests 2026-05-15 15:45:07 +03:00
zarazaex69
eceeaeba92 feat(jitsi): add Jitsi auth provider and engine 2026-05-15 15:37:58 +03:00
zarazaex69
f6e654dfce fix(salutejazz): include video tracks in publisher offer 2026-05-14 19:42:54 +03:00
zarazaex69
3c4ae52027 fix(salutejazz): unmute camera after publisher offer 2026-05-14 19:09:35 +03:00
zarazaex69
1c43379448 feat(salutejazz): support ICE and staged video offers 2026-05-14 18:39:10 +03:00
zarazaex69
c6c4fd10a4 test(e2e): restrict jazz pass cases to datachannel 2026-05-14 18:03:57 +03:00
zarazaex69
812ba2a9a2 fix: golangci lint 2026-05-14 05:02:54 +03:00
zarazaex69
9e64cbc506 feat(salutejazz): send track:add before publisher offer 2026-05-14 04:41:02 +03:00
zarazaex69
609b6a4927 fix: implementation fingerprint #52 2026-05-13 15:54:45 +03:00
zarazaex69
65555a47c8 test: port provider unit tests and fix API regressions from master
- Ported unit tests for WB Stream, SaluteJazz, and Telemost API clients
- Ported engine helper tests for SaluteJazz and Goolom
- Fixed missing WB Stream WebSocket URL update (wss://rtc-el-01.wb.ru)
- Corrected SaluteJazz header casing (X-Jazz-AuthType)
- Fixed linting errors (goconst, gosec, lll) in test files
2026-05-12 22:00:30 +03:00
zarazaex69
6280c91614 fix: CreatePermission spam log 2026-05-11 18:31:44 +03:00
zarazaex69
d65784ff8c refactor: migrate telemost to engine/goolom + auth/telemost
Decompose the monolithic internal/provider/telemost package into two
orthogonal layers: engine/goolom (Yandex proprietary SFU wire protocol —
WebSocket signaling, dual pub/sub PeerConnections, DataChannel, telemetry)
and auth/telemost (HTTP connection-info fetch → engine.Credentials).

Add engine.Config.Refresh callback so Goolom can obtain fresh peerID and
credentials on every reconnect without a direct dependency on the auth
package. engine_adapter wires the Refresh closure from authProvider.Issue.

Delete internal/provider/ entirely (telemost was the last tenant) and
remove the now-obsolete provider_adapter + its test from builtin.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 13:13:21 +03:00
zarazaex69
d48eb565f5 refactor: migrate jazz to engine/salutejazz + auth/salutejazz
Split the SaluteJazz provider along the same engine/auth seam used for
WB Stream:
- internal/engine/salutejazz — Sber WS+SDP signaling engine (pub/sub
  split, _reliable data channel, length-prefixed DataPacket envelope).
  Consumes URL/Token/Extra[password] from engine.Config; no embedded
  HTTP/auth logic. Registered as engine "salutejazz".
- internal/auth/salutejazz — create-meeting + preconnect flow.
  Implements auth.Provider (Engine() → "salutejazz") and
  auth.RoomCreator. Accepts cfg.RoomURL in "<roomID>:<password>" form
  for join, or empty / "any" / "dummy" for create-on-the-fly, matching
  the legacy provider.

The carrier name "jazz" now goes through registerEngineAuth.
engine.Config gains an Extra map so auth providers can pass engine-
specific fields (password here); engine_adapter forwards
auth.Credentials.Extra into it.

session.Gen for jazz uses the auth.RoomCreator capability. Output now
includes the password ("<roomID>:<password>") — without it the printed
room is not joinable, so the legacy roomID-only output was effectively
broken for the gen flow.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 03:35:51 +03:00
zarazaex69
071106a674 refactor: migrate wbstream to engine/livekit + auth/wbstream
Split the WB Stream provider into two orthogonal pieces:
- internal/engine/livekit — generic LiveKit transport (URL+Token only,
  no service-specific assumptions). Registered as engine "livekit".
- internal/auth/wbstream — WB Stream API flow (guest register, join,
  token exchange). Implements auth.Provider and auth.RoomCreator,
  reports engine "livekit".

The carrier name "wbstream" now goes through registerEngineAuth, which
wires the auth provider to the engine it declares. CLI surface is
unchanged. session.Gen for wbstream calls the RoomCreator directly;
that path will become fully generic in a later step. jazz and telemost
remain on the legacy provider path for now.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 03:28:34 +03:00
zarazaex69
9388a8e494 refactor: introduce engine and auth interfaces
Lay the groundwork for splitting service-specific logic (WB / Jazz /
Telemost API flows) from wire-level transport engines (LiveKit, Goolom,
future Jitsi). An engine takes only URL+Token+Name+network knobs; an
auth provider produces those credentials and reports which engine it
feeds. RoomCreator is an optional capability for the gen mode.

Existing carriers and providers are untouched.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 03:20:10 +03:00