62 Commits

Author SHA1 Message Date
spkprsnts
d5973cf2c7 feat(server): add username/password auth for outbound SOCKS5 proxy (RFC 1929) 2026-05-23 05:14:25 +05: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
74bb402289 fix(runtime): account for smux frame overhead in wire payload cap 2026-05-19 23:34:37 +03:00
zarazaex69
085aadcad7 refactor: remove SaluteJazz carrier support 2026-05-19 21:39:07 +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
65611d903e docs: replace meet.cryptopro.ru with jitsi.etudevs.ru as default 2026-05-18 22:20:02 +03:00
zarazaex69
2fdbe5c0ca fix(session): apply custom DNS before connect 2026-05-16 18:22:02 +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
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
e7657b2619 refactor: remove link layer
internal/link and internal/link/direct were a single-implementation
abstraction layer where directLink mechanically proxied every method to
transport.Transport — only Features() lived above transport.Transport,
and even that was a Features() alias. Six layers of plumbing for zero
behavioural value.

Drop the layer entirely:
- muxconn.Conn now takes a transport.Transport directly.
- server.Server and client.Client store transport.Transport, call
  transport.New, and expose Features() through transport.Transport's
  built-in method.
- server.Config and client.Config lose their Link string field.
- session.Config loses Link + validateLink + ErrLinkRequired/ErrUnsupportedLink.
- config.File and config.Profile lose the link YAML key.
- pkg/olcrtc/tunnel.Config loses Link.
- mobile drops defaultLink, SetLink, and mobileConfig.link.

Two e2e tests that exercised link.New directly are renamed to call
transport.New (TestTransportCreatesAllProviderTransportCombinations and
TestTransportConnectsFastProviderTransportMatrix); behaviour is unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 13:51:02 +03:00
zarazaex69
74fb1d81b7 refactor: introduce typed per-transport options
transport.Config used to carry a flat union of video+vp8+sei tuning fields
that every transport ignored except its own. Replace with an opaque
transport.Options marker interface and per-transport Options structs
(videochannel.Options, vp8channel.Options, seichannel.Options). Datachannel
keeps an unset Options.

link.Config gains TransportOptions and drops the 16 transport-specific
fields. server.Config and client.Config follow suit. session.Config is
left untouched in this commit — buildTransportOptions packs its existing
flat fields into the typed Options bundle before calling server/client
(session.Config is rebuilt in a later commit when YAML config moves to
typed sections).

Tests that synthesized link/server/client/transport configs are updated
to pass typed Options bundles. The shared e2eTransportOptions helper
replaces three copies of the flat field bundle in e2e/tunnel_test.go.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 07:01:07 +03:00
zarazaex69
6633c1ef8a fix: isolate videochannel peers in shared rooms 2026-05-16 04:55:25 +03:00
zarazaex69
6222896921 refactor: improve error context and test clarity 2026-05-16 04:06:55 +03:00
cyber-debug
b7a7e40899 feat: add safe traffic shaping and TLS hardening 2026-05-16 02:10:34 +03:00
cyber-debug
82b5741ab1 feat: add planned session rotation 2026-05-16 02:10:33 +03:00
cyber-debug
b0fc3bd0f1 feat: add control stream liveness 2026-05-16 02:10:33 +03:00
cyber-debug
a86f5c6948 feat: add reconnect hardening and failover profiles 2026-05-16 02:10:33 +03:00
zarazaex69
9cfb4fd9c3 docs: make jitsi the default recommended provider 2026-05-15 16:15:55 +03:00
zarazaex69
5d54209e24 fix(session): allow providers without default URL 2026-05-15 16:08:28 +03:00
zarazaex69
adf4b011b9 feat(session): add session open/close and traffic callbacks 2026-05-13 22:18:11 +03:00
zarazaex69
bcc6b2ee5c feat: remove unused client ID from config 2026-05-13 20:03:58 +03:00
zarazaex69
465d4bf500 Merge origin/master into refactor/universal-carrier 2026-05-13 19:08:59 +03:00
zarazaex69
4e99073760 fix(provider/wbstream): drop room auto-generation
WB Stream removed the room creation API; gen mode for wbstream no
longer works. Remove the wbstream branch from session.Gen, drop the
auto-generate prompt from srv.sh and the entrypoint fallback, and
update docs to instruct users to create rooms manually at stream.wb.ru.
2026-05-13 18:53:00 +03:00
zarazaex69
51e6e8a39c refactor: configuration structures instead of 27 arguments 2026-05-13 16:16:56 +03:00
zarazaex69
68a144d6c0 feat: auto-fill engine/url from auth provider defaults
Each auth.Provider now declares DefaultServiceURL() so callers do not
need to know service-specific endpoints. ApplyAuthDefaults fills Engine
and URL from the provider before validation runs — explicit flags always
win, and providers with no default URL require -url to be set explicitly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 15:23:20 +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
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
0723ddf2f5 fix: golangci errors 2026-05-11 02:21:41 +03:00
zarazaex69
f6b82da099 feat: remove nolint 2026-05-10 23:02:00 +03:00
zarazaex69
af49d17e8e feat(socks): add socks5 user and password 2026-05-10 13:56:03 +03:00
zarazaex69
3100577b0d fix: golangci errors 2026-05-09 22:30:31 +03:00
zarazaex69
d3f018825d fix: add repeat if get error timeout and any network error 2026-05-09 22:25:15 +03:00
zarazaex69
46a7e64010 feat: ad mode gen for generate room 2026-05-08 17:29:53 +03:00
zarazaex69
87a546605c fix: golangci 2026-05-07 16:36:30 +03:00
zarazaex69
9c992d6fe4 refactor: remove legacy code 2026-05-07 14:28:32 +03:00
zarazaex69
e4212b346b feat(sei): add sei config 2026-05-07 01:08:35 +03:00
zarazaex69
aa49808e68 feat(test): init base test 2026-05-06 22:33:29 +03:00
zarazaex69
8be56493f0 feat: add clientid key 2026-05-06 19:23:16 +03:00
zarazaex69
dd606ddfb2 fix: fix all golangci errors 2026-05-03 06:10:48 +03:00
zarazaex69
8996b2878a fix: validate tile codec requires 1080x1080 dimensions 2026-04-30 06:56:59 +03:00
zarazaex69
ad7c9a5c3e feat: add tile as videochannel visual codec via -video-codec tile 2026-04-30 06:55:34 +03:00
zarazaex69
f11cf6baef refactor: remove "b" codec support 2026-04-30 05:09:07 +03:00
zarazaex69
9c7b4e316f refactor(videochannel): remove b codec 2026-04-30 01:55:17 +03:00
zarazaex69
689441a7f4 Add configurable QR error correction level for video transpor 2026-04-27 18:53:39 +03:00
zarazaex69
98ad27bec5 Add configurable B codec parameters 2026-04-27 06:11:25 +03:00
zarazaex69
a2d1b95ffa feat: add support for 'b' visual codec in videochannel 2026-04-22 21:26:50 +03:00
zarazaex69
89505b7754 fix: make vp8-fps and vp8-batch flags required for vp8channel transport 2026-04-22 17:21:14 +03:00
zarazaex69
6379fa527e feat: add vp8-fps and vp8-batch settings for vp8channel throughput tuning 2026-04-22 17:17:08 +03:00