Skip to content

feat: add isolated multi-account profiles - #28

Merged
dapi merged 2 commits into
mainfrom
feat/multi-account-profiles
Aug 26, 2026
Merged

feat: add isolated multi-account profiles#28
dapi merged 2 commits into
mainfrom
feat/multi-account-profiles

Conversation

@dapi

@dapi dapi commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • add global account selection via --account and TGCLI_ACCOUNT
  • isolate config, MTProto session, archive DB, locks, downloads, service state, labels, and logs per account
  • bind named profiles to the authenticated phone and immutable Telegram user ID
  • fail closed on crossed identities, corrupt metadata, path traversal, symlink/hardlink aliases, stale registry locks, and concurrent registry updates
  • preserve the existing default store and session without migration

Verification

  • Node 25.9.0 full suite: 17 files, 289 tests
  • repeated concurrent account-registration stress test
  • launchd exact-label and named-service isolation tests
  • independent security/correctness review passed
  • live E2E with default and kz accounts authenticated simultaneously
  • primary and kz session paths and inodes are distinct
  • default phone/session remained authenticated and unchanged by named-account setup

Live result

The second account was registered as profile kz and authenticated successfully. The legacy default account remains authenticated independently. No logout, reset, migration, or session copying was performed.

@dapi
dapi merged commit 9be3f05 into main Aug 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant