Commit Graph

742 Commits

Author SHA1 Message Date
zarazaex69
677dae1231 doc: actualize 2026-05-11 15:34:25 +03:00
zarazaex69
150b3a6c8b doc: actyalize 2026-05-11 15:32:12 +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
9b572e02e9 fix: cnc.sh default auth wbstream (was telemost) 2026-05-11 14:40:51 +03:00
zarazaex69
23d782c63c fix: rename OLCRTC_CARRIER to OLCRTC_AUTH in compose and entrypoint
Beta project — breaking change allowed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 14:24:09 +03:00
zarazaex69
f76130e90d fix: replace -carrier with -auth in srv.sh, cnc.sh, entrypoint.sh
Also add OLCRTC_CARRIER fallback in entrypoint for backwards compat
with existing docker-compose configs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 14:22:32 +03:00
zarazaex69
e9a3a0581e doc: update docs for -auth flag and engine/auth split
Replace all -carrier references with -auth in settings, manual, fast,
uri, and about. Update architecture diagram and repo structure table
to reflect internal/engine + internal/auth split (replaces internal/provider).
Add pkg/olcrtc section describing the public Go library API.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 14:18:28 +03:00
zarazaex69
4d51208a3d Merge branch 'refactor/make-as-lib' into refactor/universal-carrier 2026-05-11 14:10:50 +03:00
zarazaex69
f4ab63b5fa feat: wire WatchConnection into Dial — Read unblocks on session end
Dial now sets SetEndedCallback to close the pipe with ErrSessionEnded
and starts WatchConnection in a goroutine. Consumers (e.g. sing-box)
get a concrete error from Read when the session dies permanently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 14:02:28 +03:00
zarazaex69
f287dc117a feat: expose CreateRoom in pkg/olcrtc public API
Add olcrtc.CreateRoom(ctx, authName) that delegates to the auth
provider's RoomCreator interface. Returns ErrRoomCreationUnsupported
for providers that don't support room creation (e.g. telemost).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 13:58:51 +03:00
zarazaex69
5078798204 feat: implement net.Conn via io.Pipe in pkg/olcrtc
Add conn.go wrapping Session as net.Conn: Read from pipe fed by OnData,
Write calls engine.Send, Close drains pipe and tears down session.
Add Session.Dial(ctx) as single-call connect-and-wrap entry point.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 13:55:49 +03:00
zarazaex69
0d9de3588d feat: add pkg/olcrtc — public library API
Exposes olcrtc as an embeddable Go library via pkg/olcrtc.Session.

Two usage modes:
  - Direct engine: caller supplies Engine+URL+Token, no HTTP auth flow.
  - Built-in auth: caller supplies Auth+RoomID; the registered auth
    provider (telemost, jazz, wbstream) resolves credentials internally.

Public surface:
  New(ctx, Config) (*Session, error)
  Session.Connect / Send / Close / WatchConnection
  Session.CanSend / SetEndedCallback / SetShouldReconnect
  RegisterDefaults() — pulls in all built-in engines + auth providers.

Also add !pkg/ exception to .gitignore (bare "olcrtc" pattern was
shadowing the new directory).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 13:49:19 +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
d65784ff8c refactor: migrate telemost to engine/goolom + auth/telemost
Decompose the monolithic internal/provider/telemost package into two
orthogonal layers: engine/goolom (Yandex proprietary SFU wire protocol —
WebSocket signaling, dual pub/sub PeerConnections, DataChannel, telemetry)
and auth/telemost (HTTP connection-info fetch → engine.Credentials).

Add engine.Config.Refresh callback so Goolom can obtain fresh peerID and
credentials on every reconnect without a direct dependency on the auth
package. engine_adapter wires the Refresh closure from authProvider.Issue.

Delete internal/provider/ entirely (telemost was the last tenant) and
remove the now-obsolete provider_adapter + its test from builtin.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 13:13:21 +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
9388a8e494 refactor: introduce engine and auth interfaces
Lay the groundwork for splitting service-specific logic (WB / Jazz /
Telemost API flows) from wire-level transport engines (LiveKit, Goolom,
future Jitsi). An engine takes only URL+Token+Name+network knobs; an
auth provider produces those credentials and reports which engine it
feeds. RoomCreator is an optional capability for the gen mode.

Existing carriers and providers are untouched.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 03:20:10 +03:00
zarazaex
a20cd1fdb0 Merge pull request #47 from spkprsnts/master
feat: кастомный путь к ffmpeg (Android/Mobile) и снижение задержки видео
2026-05-11 02:31:31 +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
b7e758c283 perf(ffmpeg): reduce VPx encoding latency 2026-05-11 03:49:57 +05: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
7be008b99e doc: fix typo 2026-05-11 01:05:55 +03:00
zarazaex69
1300b78f0a Merge branch 'refactor/weekrefactor' 2026-05-11 01:04:13 +03:00
zarazaex69
d92e872855 chore: revert .golangci.yml to master config 2026-05-11 01:02:36 +03:00
zarazaex69
74338524a7 fix: golangci errors 2026-05-11 00:56:40 +03:00
zarazaex69
6cf8e483df fix: golangci.uml errors 2026-05-10 23:38:47 +03:00
zarazaex69
1070c34f3a Merge remote-tracking branch 'origin/master' into refactor/weekrefactor 2026-05-10 23:06:36 +03:00
zarazaex69
bdc13024f4 feat: update gr 2026-05-10 23:02:33 +03:00
zarazaex69
f6b82da099 feat: remove nolint 2026-05-10 23:02:00 +03:00
zarazaex69
50157fd50c feat: make golangci harder 2026-05-10 23:00:06 +03:00
zarazaex69
efd1d5ff16 fix: test dont work 2026-05-10 22:51:51 +03:00
zarazaex69
5fea618bba doc: add images 2026-05-10 22:27:55 +03:00
zarazaex69
6a5da4d897 feat(srv): use -o flag 2026-05-10 22:00:59 +03:00
zarazaex69
66b3d21592 upd: submodule 2026-05-10 21:30:22 +03:00
zarazaex69
9902359c1a doc: add about no cache flag and sync to new standarts 2026-05-10 20:19:39 +03:00
zarazaex69
343896509e fix: cache dont delete 2026-05-10 20:19:36 +03:00
zarazaex69
1e0bcc526a feat(script): add no-cache flag 2026-05-10 20:15:05 +03:00
zarazaex69
cfe57c929b feat(script): use google dns and change comment / carrier to telemost 2026-05-10 20:13:03 +03:00
zarazaex69
8637f076f5 feat: use compact render 2026-05-10 20:13:03 +03:00
zarazaex69
917467969e feat: add chache to script 2026-05-10 20:13:03 +03:00
zarazaex69
7271f0532f fear(gr): update submodule 2026-05-10 20:13:03 +03:00
zarazaex
8fd75283ea Merge pull request #46 from alananisimov/fix-socks5
fix socks5
2026-05-10 18:33:10 +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
043f78904d doc: add text about client-id 2026-05-10 16:52:13 +03:00
zarazaex
fab5aa9a28 Merge pull request #45 from alananisimov/add-http-ping-mobile
add http ping to mobile
2026-05-10 16:20:02 +03:00
Alexander Anisimov
7d1a367904 lint fix 2026-05-10 16:16:24 +03:00
Alexander Anisimov
e0dd953c5a add http ping to mobile 2026-05-10 16:09:02 +03:00