Commit Graph

93 Commits

Author SHA1 Message Date
cyber-debug
b0fc3bd0f1 feat: add control stream liveness 2026-05-16 02:10:33 +03:00
zarazaex69
82e8067384 fix(client,server): defer shutdown BEFORE bringUpLink to close MUC on early failures
When bringUpLink errored — a handshake timeout against a wedged transport,
for instance — Run/RunWithReady returned straight to the caller without
calling shutdown, so the carrier link that had already joined the MUC
was never closed. The result was a ghost participant lingering on
Jicofo/JVB until idle timeout, which the next test in the same room
inherited as stale endpoints in 'bridge open'.

The clue from logs was that failing seichannel runs produced one
'leave-muc handshake ok' instead of two: the server's normal
ctx-cancel path got there cleanly, but the client's bringUpLink
returned early and skipped its defer.

Both paths now register shutdown before the bringUpLink call. shutdown
is nil-safe and idempotent so it works whether or not bringUpLink
actually populated link/session fields. server's wg.Wait moves into
the same defer so wg goroutines spawned by partial setup also drain
before Run returns.
2026-05-16 01:38:52 +03:00
zarazaex69
76c709f9a5 fix: golangci lint fix 2026-05-14 04:21:11 +03:00
zarazaex69
b36bee3f0e fix: harden reconnect shutdown and vp8 startup 2026-05-14 02:45:11 +03:00
zarazaex69
20f2c1397c feat: add timeout to openControlStream function 2026-05-13 22:07:34 +03:00
zarazaex69
bcc6b2ee5c feat: remove unused client ID from config 2026-05-13 20:03:58 +03:00
zarazaex69
51e6e8a39c refactor: configuration structures instead of 27 arguments 2026-05-13 16:16:56 +03:00
zarazaex69
dc1fe0f19c refactor: replace -carrier with -auth/-engine/-url/-token (stage E)
Break CLI backwards compatibility as planned for refactor/universal-carrier:

- Drop -carrier flag; add -auth (auth provider name), -engine (engine
  name for -auth none), -url and -token (SFU endpoint + access token for
  direct/none auth mode).
- session.Config.Carrier → Auth + Engine + URL + Token.
- session.Gen() is now generic: auth.Get(cfg.Auth).(auth.RoomCreator)
  replaces the hard-coded switch on carrier names.
- Register a "none" carrier in builtin (registerDirect) that bypasses
  auth and connects directly to any engine with caller-supplied URL+Token.
- auth/telemost.Provider.Issue now accepts a raw room-ID hash in addition
  to a full https://telemost.yandex.ru/j/<id> URL.
- Plumb Engine/URL/Token from session.Config through server.Run,
  client.Run/RunWithReady, bringUpLink, link.Config, transport.Config, and
  carrier.Config so the "none" carrier has access to them end-to-end.
- Update all tests and mobile.go call sites.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 13:31:07 +03:00
zarazaex69
0723ddf2f5 fix: golangci errors 2026-05-11 02:21:41 +03:00
zarazaex69
1070c34f3a Merge remote-tracking branch 'origin/master' into refactor/weekrefactor 2026-05-10 23:06:36 +03:00
zarazaex69
f6b82da099 feat: remove nolint 2026-05-10 23:02:00 +03:00
zarazaex69
efd1d5ff16 fix: test dont work 2026-05-10 22:51:51 +03:00
Alexander Anisimov
c4b67e704b fix lint 2026-05-10 18:27:00 +03:00
Alexander Anisimov
8348c3d026 fix socks5 2026-05-10 18:20:10 +03:00
zarazaex69
7aec207603 fix: integer overflow conversion in client 2026-05-10 14:11:58 +03:00
zarazaex69
7128dafda2 feat(socks, test): add test for socks5 user and password 2026-05-10 13:56:20 +03:00
zarazaex69
af49d17e8e feat(socks): add socks5 user and password 2026-05-10 13:56:03 +03:00
zarazaex69
87a546605c fix: golangci 2026-05-07 16:36:30 +03:00
zarazaex69
e4212b346b feat(sei): add sei config 2026-05-07 01:08:35 +03:00
zarazaex69
63dd61c61d fix(test): fix all test bugs 2026-05-07 00:38:52 +03:00
zarazaex69
aa49808e68 feat(test): init base test 2026-05-06 22:33:29 +03:00
zarazaex69
0cae2d0b8f fix: golangci errors 2026-05-06 19:55:09 +03:00
zarazaex69
1965cff5cf fix: -client-id bug 2026-05-06 19:23:16 +03:00
zarazaex69
8be56493f0 feat: add clientid key 2026-05-06 19:23:16 +03:00
zarazaex69
3c816a38e8 fix: state 2026-05-03 11:54:13 +03:00
zarazaex69
dd606ddfb2 fix: fix all golangci errors 2026-05-03 06:10:48 +03:00
zarazaex69
5bb8178e50 feat(smux): replace internal/mux with smux over KCP
Replace the hand-rolled multiplexer (internal/mux) with xtaci/smux v2
running on top of the existing KCP-reliable vp8channel transport.

- Add internal/muxconn: io.ReadWriteCloser adapter bridging link.Link
  (message-oriented) into the byte-stream smux expects; applies AEAD
  on every write and inverts it on every received message
- Rewrite client: smux.Client session over muxconn; OpenStream per
  SOCKS5 connection; reconnect handler tears down and rebuilds session
- Rewrite server: smux.Server session; AcceptStream loop dispatches
  each stream to a proxy handler; tolerates session bounces on reconnect
- Delete internal/mux: all sequence/reorder/buffer logic is now
  handled by smux + KCP
2026-05-03 00:45:58 +03:00
zarazaex69
ad7c9a5c3e feat: add tile as videochannel visual codec via -video-codec tile 2026-04-30 06:55:34 +03:00
zarazaex69
689441a7f4 Add configurable QR error correction level for video transpor 2026-04-27 18:53:39 +03:00
zarazaex69
a2d1b95ffa feat: add support for 'b' visual codec in videochannel 2026-04-22 21:26:50 +03:00
zarazaex69
6379fa527e feat: add vp8-fps and vp8-batch settings for vp8channel throughput tuning 2026-04-22 17:17:08 +03:00
zarazaex69
af34cdbd8e feat: add video-qr-size configuration for videochannel transport 2026-04-21 22:32:01 +03:00
zarazaex69
f6cfaf8081 refactor: implement explicit shutdown logic for client connections and server stream pumps 2026-04-21 02:30:18 +03:00
zarazaex69
513e2bdd9d feat: refactor client connection handling and error management 2026-04-21 01:51:48 +03:00
zarazaex69
9e09975165 feat: implement video channel transport 2026-04-21 01:32:17 +03:00
zarazaex69
2cad1b0e87 refactor: align tunnel runtime terminology 2026-04-20 20:20:02 +03:00
zarazaex69
ea249091c4 refactor: make link selectable at runtime 2026-04-20 20:18:23 +03:00
zarazaex69
9bd9503daa refactor: add direct link layer 2026-04-20 20:13:49 +03:00
zarazaex69
fffb90e321 refactor: introduce transport layer 2026-04-20 20:05:23 +03:00
zarazaex69
a58e343331 refactor: improve SOCKS5 error handling, refactor client connection logic, and add documentation to internal packages. 2026-04-20 05:46:27 +03:00
zarazaex69
d1d82ff6a3 refactor(client): replace log.Printf with logger and standardize 2026-04-20 05:29:27 +03:00
zarazaex69
35994565c6 refactor(provider): fix golangci 2026-04-14 02:26:28 +03:00
zarazaex69
6e6265799a feat(provider): abstract provider interface and add jazz support 2026-04-14 01:10:57 +03:00
zarazaex69
1509f28e23 fix(reconnect): guard mux operations behind data channel validity check 2026-04-14 00:24:22 +03:00
zarazaex69
0aa73f72ef fix(peer): remove unused reconnect callback from data channel close handler 2026-04-14 00:19:02 +03:00
zarazaex69
17e8e52e43 refactor: simplify and clean up logging messages 2026-04-12 23:56:51 +03:00
zarazaex69
e153ad2cb0 refactor: bulk fix golangci-lint issues (perfsprint, revive, errcheck, gosec, etc.) 2026-04-12 23:33:45 +03:00
zarazaex69
15795c0da1 refactor: pass context to NewPeer 2026-04-12 23:29:52 +03:00
zarazaex69
5a1a0c5453 refactor(logger): rename logger methods to Verbosef/Debugf 2026-04-12 23:29:27 +03:00
zarazaex69
d92e7f0158 refactor(client): fix linter issues in client.go 2026-04-12 23:26:14 +03:00