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>
This commit is contained in:
zarazaex69
2026-05-11 13:31:07 +03:00
parent d65784ff8c
commit dc1fe0f19c
20 changed files with 191 additions and 151 deletions
@@ -85,6 +85,9 @@ func New(ctx context.Context, cfg transport.Config) (transport.Transport, error)
DNSServer: cfg.DNSServer,
ProxyAddr: cfg.ProxyAddr,
ProxyPort: cfg.ProxyPort,
Engine: cfg.Engine,
URL: cfg.URL,
Token: cfg.Token,
})
if err != nil {
return nil, fmt.Errorf("create carrier transport: %w", err)