Commit Graph

376 Commits

Author SHA1 Message Date
spkprsnts
5e4c2e27ee refactor(server): split socks5 connect logic
- Extract auth logic to helper functions
- Add linter directives for gosec and globals
2026-05-24 02:18:34 +05:00
spkprsnts
d5973cf2c7 feat(server): add username/password auth for outbound SOCKS5 proxy (RFC 1929) 2026-05-23 05:14:25 +05:00
zarazaex69
fb5ce90e61 refactor(e2e): extract soak pump helpers and modernize range lnt 2026-05-22 20:51:46 +03:00
zarazaex69
d8139a7178 refactor(muxconn): recycle plaintext buffers via sync.Pool 2026-05-22 20:37:17 +03:00
zarazaex69
99a7b12538 refactor(muxconn): replace mutex/cond buffer with channel pipeline 2026-05-22 19:55:13 +03:00
zarazaex69
e9373aabd8 perf(crypto): replace random nonces with salt+counter scheme 2026-05-22 19:38:29 +03:00
zarazaex69
d0b5074072 test(e2e): add local throughput soak test 2026-05-22 18:27:20 +03:00
zarazaex69
c45e12d5c6 chore: replace default Jitsi URL with meet.cryptopro.ru 2026-05-21 19:07:31 +03:00
zarazaex69
9bf81248c4 docs: replace 1.1.1.1 with 8.8.8.8 as default DNS server 2026-05-21 19:01:10 +03:00
zarazaex69
0ec244e0dc docs: update docs and remove wbstream room creation support 2026-05-21 18:51:38 +03:00
zarazaex69
19dba1691d test(e2e): handle clean exits in tunnel startup 2026-05-21 17:12:30 +03:00
zarazaex69
618b210926 fix: golangci 2026-05-21 14:30:18 +03:00
zarazaex69
5839b05763 fix: cancel go t -> startControlLoop 2026-05-21 14:17:39 +03:00
zarazaex69
4b7185f411 fix(client): survive liveness loss without killing SOCKS listener 2026-05-21 13:42:22 +03:00
zarazaex69
bfa6d73ad1 feat(vp8channel): batch multiple KCP packets per RTP sample 2026-05-20 00:12:01 +03:00
zarazaex69
74bb402289 fix(runtime): account for smux frame overhead in wire payload cap 2026-05-19 23:34:37 +03:00
zarazaex69
ccf3ff0988 fix: golangci 2026-05-19 22:02:56 +03:00
zarazaex69
2b6f77f0f6 refactor(vp8channel): add ResetPeer with epoch rotation and mutex #60 2026-05-19 21:58:12 +03:00
zarazaex69
085aadcad7 refactor: remove SaluteJazz carrier support 2026-05-19 21:39:07 +03:00
zarazaex69
d84fb78eef test(e2e): mark jitsi video and vp8 transports as unstable 2026-05-19 09:29:19 +03:00
zarazaex69
3bee3ddbe6 chore(vp8channel): update default fps to 60 and batch size to 64 2026-05-19 09:08:01 +03:00
zarazaex69
31796efe15 docs: replace meet.cryptopro.ru with meet.small-dm.ru as default 2026-05-18 23:37:10 +03:00
zarazaex69
d872f3c900 docs: replace jitsi.etudevs.ru with meet.cryptopro.ru 2026-05-18 22:30:51 +03:00
zarazaex69
65611d903e docs: replace meet.cryptopro.ru with jitsi.etudevs.ru as default 2026-05-18 22:20:02 +03:00
zarazaex69
535c3b75d1 refactor(server): replace context with done channel for stop signal 2026-05-18 08:14:39 +03:00
zarazaex69
4ce5d0356e refactor(logger): extract DisableNoisyPionLogs helper 2026-05-18 05:41:04 +03:00
zarazaex69
143f6dd8a6 feat: add peer-addressed routing across transport and engine layers 2026-05-18 02:38:45 +03:00
zarazaex69
95b73750c9 fix: golangci 2026-05-18 00:46:26 +03:00
zarazaex69
4adea8824f feat(config,script): validate UTF-8 config and hex encryption keys 2026-05-17 22:20:14 +03:00
zarazaex69
f1cad5d6a2 fix(logger): suppress noisy Pion TURN refresh logs 2026-05-17 20:40:42 +03:00
zarazaex69
c6c301c058 fix: handle graceful control shutdown and reconnects 2026-05-17 18:35:05 +03:00
zarazaex69
9a2bbfd44e feat(videochannel): add per-fragment ack tracking 2026-05-17 05:45:43 +03:00
zarazaex69
33cccbc906 fix(e2e): pace stress bulk echo by chunk roundtrip 2026-05-17 05:07:00 +03:00
zarazaex69
7657b3c7b2 test(e2e): time-box stress bulk phase by duration 2026-05-17 00:28:37 +03:00
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
2fdbe5c0ca fix(session): apply custom DNS before connect 2026-05-16 18:22:02 +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
80cc3bafe4 chore(lint): satisfy golangci-lint after big refactor
Address 25 issues reported by golangci-lint following the structural
refactor:

- cyclop: split common.Reassembler.Push into upsert/storeChunk/deliver
  helpers (12→5). Move seichannel option-default fill into Options.
  withDefaults so New stays under the limit.
- exhaustive: enumerate ResultPartial / ResultIgnore explicitly in
  seichannel and videochannel switches over common.Result.
- gosec G115: annotate the test-fixture int→uint16/uint32 conversions
  in common_test.go with //nolint:gosec.
- lll: break up the 130+ character one-liners in transport
  unit/integration tests and the videochannel track-ID construction.
- nolintlint: drop the stale //nolint:cyclop in mobile_test.go where
  the underlying complexity already cleared the limit.
- wrapcheck: wrap errors returned from internal/framing and
  internal/runtime in their public callers (handshake, control,
  server.setupCipher, client.setupCipher) so they carry the layer name.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 14:38:03 +03:00
zarazaex69
190c2b5f84 chore(vp8channel): replace abusive header comment with package doc
internal/transport/vp8channel/transport.go opened with a 24-line block
of Russian profanity addressed at Yandex SFU engineers (the engine
vp8channel targets to evade). It served no engineering purpose and is
not suitable for an open-source codebase.

Replace with a one-paragraph package doc summarising what the package
actually does (KCP-over-VP8-keyframes byte transport for SFUs that
validate VP8 conformance).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 14:30:16 +03:00
zarazaex69
35e6c16333 refactor: split flat session.Config tunables into typed sections
session.Config used to spread 16 per-transport tuning fields across its
top level (VideoWidth/Height/.../VP8FPS/.../SEIAckTimeoutMS). The flat
layout meant every caller had to know which fields belong to which
transport, and the YAML→session bridge in internal/config repeated the
same name 32 times across Apply/ApplyProfile.

Group them under VideoConfig/VP8Config/SEIConfig structs hung off
session.Config. internal/config now does e.g.
  dst.Video.Width = pickInt(dst.Video.Width, f.Video.Width)
instead of touching dst.VideoWidth. session.ApplyTransportDefaults,
validateVideoChannel/VP8Channel/SEIChannel and buildTransportOptions
read through cfg.Video.*/cfg.VP8.*/cfg.SEI.* in the same way.

The YAML schema itself was already grouped (Video / VP8 / SEI sections);
this commit lines session.Config up with it so the Apply functions can
mirror the YAML structure 1:1 instead of unpacking it into 32 flat
assignments.

All session/config/e2e/cmd/main tests that referenced cfg.VideoX directly
are updated to cfg.Video.X.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 14:28:57 +03:00
zarazaex69
f469bd72af refactor: extract shared session runtime into internal/runtime
server.go and client.go each carried byte-identical copies of
smuxConfig (~20 lines), setupCipher (~18 lines), and the health
bookkeeping pair recordSession/Pong/Missed/Unhealthy/Reconnect plus a
private healthMu+status+notifyHealth scaffold. Same code, twice.

Add internal/runtime exposing:
- SetupCipher, SmuxConfig, MaxPayload — common construction helpers,
  ErrKeyRequired/ErrKeySize re-exported from runtime so existing
  errors.Is checks on server.ErrKeyRequired etc. keep working.
- HealthTracker — nil-safe wrapper around control.Status with
  RecordSession/Pong/Missed/Unhealthy/Reconnect that publishes through an
  OnHealth callback supplied at construction.

server and client now hold a *runtime.HealthTracker instead of their own
mu+status+notify scaffolds. recordX methods on Server/Client are now
one-liners that forward to the tracker. smuxConfig(0) replaces the prior
variadic smuxConfig() in test call sites; nil-safe Status()/update() on
HealthTracker means tests that build raw &Server{}/&Client{} no longer
need to wire up a tracker for the records to be no-ops.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 14:24:46 +03:00