98 Commits

Author SHA1 Message Date
neuronori 1408cf81ab feat(wbstream): support pre-issued account token via auth.token
allow supplying a wb account access token in config so the session
joins as that account instead of an anonymous guest. when auth.token
is empty the provider falls back to the guest-register flow.

threads auth.token through config -> session -> server/client ->
transport -> engine builtin -> auth provider.
2026-06-30 19:15:03 +00:00
neuronori 605de6e5b3 fix: resolve lint issues in pion socket protection
- add package and exported-method doc comments
- use errors.New for sentinel, drop unused nolint directives
- wrap AcceptTCP error
- fix errcheck/noctx in tests
- extract newSettingEngine to keep negotiatePC under complexity limit
2026-06-30 11:32:38 +00:00
hawkff a68f2b668f feat: apply socket protection to Pion 2026-06-29 19:54:44 -04:00
nori 1ad1a7d51e fix: target xmpp domain not web host in keepalive ping 2026-06-28 16:02:32 +00:00
nori 7d0d9093d8 fix(goolom): bound peer connection close so stuck TURN dealloc cannot stall teardown (issue #95) 2026-06-26 16:02:30 +03:00
nori ae78a4c870 fix(goolom): keep advertised TURN relays for NAT traversal (issue #95) 2026-06-26 15:37:43 +03:00
neuronori 751b30b730 fix(jitsi): accept pre-latch broadcast so WaitForPeer unblocks (issue #95)
WaitForPeer makes the client block before it sends its SYN, so the
server cannot yet know the client epoch and its first welcome arrives as
a broadcast (receiverEpoch=0). The same happens on every reconnect:
peerEpoch is reset to 0 and the peer re-announces via a broadcast
Send(nil). The strict requireTargetedPeer guard dropped those broadcasts
while unlatched, so peerEpoch never latched and WaitForPeer hung for its
whole timeout - the link connected and pinged but no data ever flowed
("ping works, no connection"), most visibly when a peer left and
reconnected. Accept a broadcast while unlatched (peerEpoch==0) and keep
rejecting third-party broadcasts once latched.
2026-06-25 17:52:29 +00:00
neuronori 152f091490 fix(client,jitsi): bound peer wait, guard reconnect SYN race, drop pre-latch broadcasts
- bound WaitForPeer in bringUpLink/tryReopenSession to handshake timeout
  so a missing peer fails fast instead of hanging before the SOCKS listener
- call waitForPeer on the reconnect path too: resetLinkPeer clears the peer
  epoch, so without it the post-reconnect SYN re-races the server bridge
- restore strict requireTargetedPeer guard: the server always replies
  targeted (it latches the client epoch from the SYN before smux replies),
  so untargeted broadcasts before latch must be dropped
- remove per-frame debug logging on the bridge send/recv hot path
- extract buildSmuxClient / establishPeerSession helpers and wrap interface
  errors to satisfy cyclop/nestif/wrapcheck
2026-06-25 12:02:40 +00:00
VaisVaisov c035f403a2 fix: wait for remote peer before opening smux stream (race condition)
Client was racing ahead of the server by ~2s: it opened the smux SYN
right after bridge-ready, but JVB silently dropped those frames because
the server hadn't opened its datachannel yet. smux does not retransmit
SYN, so AcceptStream on the server side never returned and the handshake
timed out.

Add WaitForPeer (engine.PeerReadySession / transport.PeerReadyTransport)
that polls peerEpoch until the first epoch broadcast from the remote
side is received, then proceed to smux + handshake.
2026-06-21 23:58:39 +05:00
VaisVaisov c19906e85e fix(jitsi): keep xmpp connection alive and accept server broadcasts
xmppKeepalive was using fire-and-forget Send(); on a half-open TCP
connection pings were sent but the missing reply went undetected,
leaving the session stuck. Switch to SendIQWait so a timeout triggers
a reconnect.

In peer-routing mode the server may send the initial welcome frame as a
broadcast (receiverEpoch=0) before it has learned the client's
localEpoch. The previous requireTargetedPeer guard dropped every
broadcast unconditionally. Tighten the guard: only drop frames whose
senderEpoch is unknown or belongs to a different peer; frames from the
already-latched peer are always accepted.
2026-06-21 15:14:33 +05:00
nori b20554b19c fix(vp8channel): keep SFU forwarding bulk via decodable keepalive keyframe
inject a clean VP8 keyframe every ~2s during bulk so the SFU keeps
forwarding the track instead of stalling after its decode timeout.
add RTCP interceptors and IPv4-only ICE, priority control/data mux,
publisher PC reconnect with stable control epoch, and longer smux
keepalive/liveness windows to survive the reconnect gap
2026-06-20 00:37:08 +00:00
zarazaex69 95fd5b7d3c fix(server): tolerate stale control frames during handshake
After a session reinstall, the old client's control loop may have
already written a CONTROL_PING frame to the link before its context
was cancelled. This frame arrives at the server's new smux session and
is routed to the handshake stream (matching stream ID), where the
framing layer interprets the JSON bytes as an impossibly large length
prefix ('{\x22ve' = 2065856101 > 65536).

Previously this triggered a full reinstall, which could cascade into
a reconnect storm. Now acceptHandshake and acceptPeerHandshake
recognize ErrFrameTooLarge as a stale-frame artifact: they close the
polluted stream and retry AcceptStream up to 3 times, giving the real
CLIENT_HELLO a chance to arrive on the next stream.
2026-06-13 02:53:22 +03:00
zarazaex69 1f72c87d1e fix(jitsi): remove RTCP keepalive reconnect loop 2026-06-13 00:54:55 +03:00
zarazaex69 26141697c2 fix(jitsi): keep byte-stream sessions alive with RTP 2026-06-13 00:51:20 +03:00
zarazaex69 2ed53c3d53 style: remove gocognit nolint directive from negotiatePC 2026-06-07 01:25:43 +03:00
zarazaex 7757b0cfec Merge pull request #94 from cyber-debug/master
perf: снизить idle CPU и удалить Docker-поддержку
2026-06-07 01:16:40 +03:00
zarazaex69 5051ea7c8f fix(jitsi): reconnect on peer connection failure
- now jitsi not fail and work SO stable
2026-06-06 18:39:16 +03:00
sbramn 1f6571d1c1 fix(jitsi): keep negotiation while avoiding idle rtcp 2026-06-05 20:01:45 +03:00
sbramn 275b61480c fix(jitsi): skip idle peer connection keepalive 2026-06-05 19:49:06 +03:00
sbramn 760ff2b6c0 Merge branch 'openlibrecommunity:master' into master 2026-06-05 19:40:39 +03:00
sbramn 8192802a3c Remove Docker support and reduce runtime load 2026-06-05 19:39:32 +03:00
zarazaex69 b0e0fb9a57 fix(jitsi): timeout MUC rejoin during reconnect 2026-06-05 19:32:23 +03:00
zarazaex69 7a6cb7f772 fix(jitsi): require targeted peer frames for clients 2026-06-05 18:11:46 +03:00
zarazaex69 e2c4b1e3d2 feat: fix reconect cycle #89 2026-06-02 16:34:07 +03:00
zarazaex69 5dd6822d80 refactor(jitsi): clean up linter suppressions and test helpers 2026-06-01 15:44:59 +03:00
zarazaex69 0684ace550 test(jitsi): update tests for consecutive-failure reconnect model 2026-06-01 15:00:55 +03:00
zarazaex69 649cad5d2d fix(jitsi): reset reconnect count after success 2026-06-01 14:58:32 +03:00
zarazaex69 90e2ed9c33 fix(jitsi): re-latch peer after reconnect 2026-06-01 13:35:36 +03:00
zarazaex69 ac930021b1 fix(jitsi): accept peer epoch changes without reconnect 2026-06-01 13:21:08 +03:00
zarazaex69 1d0a1467e4 test(jitsi): replace keepalive tests with paired chaos 2026-06-01 13:14:34 +03:00
zarazaex69 cc65c033e2 fix(jitsi): prevent reconnect loops and idle 2026-06-01 12:51:06 +03:00
e.barskov bd1a95cac5 fix(jitsi): re-allocate Jicofo focus on reconnect (non-blocking)
The lightweight soft-rejoin path (jSess.Rejoin) skips Jicofo focus
allocation and joins the MUC with a bare presence. After the client
leaves and Jicofo idle-terminates the now-empty conference
(session-terminate <expired/>), the room/focus is torn down. A bare
rejoin presence is then rejected by Prosody with
<presence type='error'><not-allowed/>, and the library's JoinMUC matches
a stale status-110 left in its stanza buffer and falsely reports success.
The engine then waits forever for a session-initiate that never arrives
while actually being outside the room, so the client can never reconnect.

Re-establish the session from scratch via j.JoinMUC instead, which runs
dial -> focus allocation -> MUC join in the correct order (focus first,
so Jicofo recreates the room), exactly like the initial Connect, but
WITHOUT blocking on session-initiate. The fresh session-initiate is
awaited separately via WaitJingleReinitiate once a peer rejoins, so the
non-blocking reconnect contract is preserved.

Verified on a live deployment: two consecutive reconnect cycles now
complete (bridge open sctp -> reconnected -> session opened) where the
old path hung after "waiting for session-initiate".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 00:36:25 +04:00
zarazaex69 dfce46dd5f fix(jitsi): add bridge keepalive loop 2026-05-31 19:41:09 +03:00
zarazaex69 71b1fbdf27 fix(jitsi): make Connect non-blocking, wait for session-initiate async
j.Join() blocks on WaitJingle until Jicofo sends session-initiate,
which only happens when a second participant joins the room. With the
transport-level connect timeout (30-60s), the server crashes if no one
joins in time.

Switch to j.JoinMUC() which returns immediately after joining the MUC.
A background goroutine (waitForJingle) waits for session-initiate and
then opens the bridge + negotiates the PeerConnection. This way Connect
succeeds as soon as the XMPP connection is established, regardless of
whether another participant is present.
2026-05-31 13:07:22 +03:00
zarazaex ab848b4c48 Merge pull request #84 from grandgaev/fix/rtcp-keepalive-wedge
fix(jitsi): break out of rtcpKeepalive on persistent write errors
2026-05-31 07:55:28 +03:00
Rock Brock ffa5d4ac13 fix(jitsi): break out of rtcpKeepalive loop on persistent write errors
When the JVB bridge disconnects but the session is not yet closed
(e.g. during a pending reconnect), rtcpKeepalive spins indefinitely
logging "rtcp keepalive write: io: read/write on closed pipe" every
5 seconds. The process appears alive but is functionally dead —
systemd Restart=always never triggers and the instance becomes
permanently wedged.

Add an error counter that triggers requestReconnect after 3
consecutive WriteRTCP failures, allowing the supervisor to
tear down and re-establish the bridge connection. Reset the
counter on any successful write.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-31 07:23:23 +05:00
zarazaex69 efadd37df4 fix: golangci 2026-05-30 12:16:20 +03:00
zarazaex69 da3bf43721 style: normalize dash usage in comments and logs 2026-05-29 22:08:36 +03:00
zarazaex69 c4984f65d6 fix(jitsi): reuse xmpp session on reconnect. fix #82 2026-05-29 22:07:15 +03:00
zarazaex69 33f46460dc test(e2e): tune videochannel params and reduce chunk timeout 2026-05-28 13:19:14 +03:00
zarazaex69 4fce5773f8 fix(goolom): remove premature onReconnect callback invocation 2026-05-26 01:05:31 +03:00
zarazaex69 fe85457754 fix(jitsi): add RTCP keepalive to prevent JVB session expiry 2026-05-25 12:57:18 +03:00
zarazaex69 e64ed167cc refactor(jitsi): extract openBridgeWS and openBridgeSCTP helpers 2026-05-25 11:39:22 +03:00
zarazaex69 c2170c058b feat(jitsi): add SCTP fallback when colibri-ws is unavailable
- Fixed instances that were not working x3
2026-05-25 10:41:23 +03:00
zarazaex69 12a28e6cbf chore: replace default jitsi URL with meet1.arbitr.ru 2026-05-25 10:08:26 +03:00
zarazaex69 98c6dec4a0 docs: normalize em dash to hyphen in Russian documentation and code comments 2026-05-24 05:31:55 +03:00
zarazaex69 c45e12d5c6 chore: replace default Jitsi URL with meet.cryptopro.ru 2026-05-21 19:07:31 +03:00
zarazaex69 4b7185f411 fix(client): survive liveness loss without killing SOCKS listener 2026-05-21 13:42:22 +03:00
zarazaex69 085aadcad7 refactor: remove SaluteJazz carrier support 2026-05-19 21:39:07 +03:00
zarazaex69 31796efe15 docs: replace meet.cryptopro.ru with meet.small-dm.ru as default 2026-05-18 23:37:10 +03:00