Commit Graph

70 Commits

Author SHA1 Message Date
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
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
6222896921 refactor: improve error context and test clarity 2026-05-16 04:06:55 +03:00
cyber-debug
b0aee57aa5 feat: track failover supervisor status 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
76c709f9a5 fix: golangci lint fix 2026-05-14 04:21:11 +03:00
zarazaex69
bcc6b2ee5c feat: remove unused client ID from config 2026-05-13 20:03:58 +03:00
zarazaex69
cf6490b5e0 feat: add support for reading configuration from YAML file 2026-05-13 17:17:31 +03:00
zarazaex69
359a2d94df feat: add YAML configuration support 2026-05-13 16:37:09 +03:00
zarazaex69
f9c5f2c964 Merge origin/master into refactor/universal-carrier
Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-05-13 15:50:29 +03:00
Alexander Anisimov
dd64141247 add cgo ping library entrypoint 2026-05-13 15:25:41 +03:00
zarazaex69
6280c91614 fix: CreatePermission spam log 2026-05-11 18:31:44 +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
d97129b031 fix: suppress turnc ERROR noise from std log in non-debug mode 2026-05-11 14:57:31 +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
e25eed39a9 Merge remote-tracking branch 'origin/master' into pr-47-merge
# Conflicts:
#	cmd/olcrtc/main.go
#	internal/transport/videochannel/ffmpeg.go
2026-05-11 02:30:16 +03:00
zarazaex69
0723ddf2f5 fix: golangci errors 2026-05-11 02:21:41 +03:00
spkprsnts
ba3d622233 feat(ffmpeg): Add -ffmpeg flag for custom path
- Add -ffmpeg flag for custom path
- Allow FFMPEG_BIN env var to set path
- Update ffmpeg
2026-05-11 03:31:14 +05: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
e0a57b3ad4 fix: golangci errors 2026-05-08 17:39:54 +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
99ee4d8bbc fix:fix suppress noisy LiveKit/pion logs in non-debug mode 2026-05-07 13:03:19 +03:00
zarazaex69
e4212b346b feat(sei): add sei config 2026-05-07 01:08:35 +03:00
zarazaex69
9d8f063ce3 feat(test): up test coverage 2026-05-07 00:06:28 +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
2d2e9d5045 feat: configure livekit logger suppression for production 2026-05-03 18:25:27 +03:00
zarazaex69
dd606ddfb2 fix: fix all golangci errors 2026-05-03 06:10:48 +03:00
zarazaex69
ad7c9a5c3e feat: add tile as videochannel visual codec via -video-codec tile 2026-04-30 06:55:34 +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
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
d1c6545d38 feat(loging): update the error messages 2026-04-21 20:36:16 +03:00
zarazaex69
73fb1227d9 feat: implement strict configuration validation and remove default values for required CLI flags 2026-04-21 02:12:54 +03:00
zarazaex69
9bd430cb6b feat: add video hardware acceleration flag and improve shutdown error handling 2026-04-21 01:54:37 +03:00
zarazaex69
97b12eb2d8 feat: add H264 codec support and hardware acceleration via NVENC to FFmpeg pipeline 2026-04-21 01:43:48 +03:00
zarazaex69
9e09975165 feat: implement video channel transport 2026-04-21 01:32:17 +03:00
zarazaex69
ea249091c4 refactor: make link selectable at runtime 2026-04-20 20:18:23 +03:00
zarazaex69
27b94b6692 refactor: introduce carrier facade 2026-04-20 20:11:02 +03:00
zarazaex69
f9ad12c733 refactor: extract session runtime wiring 2026-04-20 20:09:00 +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
2d72fed2a3 refactor(main): use internal/logger and clean up configuration 2026-04-20 05:30:16 +03:00