Skip to content

Inject#6

Merged
loyalpartner merged 5 commits intomasterfrom
inject
Apr 16, 2026
Merged

Inject#6
loyalpartner merged 5 commits intomasterfrom
inject

Conversation

@loyalpartner
Copy link
Copy Markdown
Owner

No description provided.

Previously the cache_guid → email mapping was built once at Chrome
startup, before sync initialized — so cache_guid didn't exist yet
and the mapping was always empty on first run.

Now the proxy scans Preferences files on demand when a client_id
is first seen, then caches the result. Works correctly for:
- First-time sync (cache_guid appears after sync init)
- Multiple profiles (scans all Profile dirs on miss)
- New accounts added mid-session
…erences

Chrome generates cache_guid in memory and starts syncing before writing
transport_data_per_account to disk. For profiles with a single logged-in
account, use that email directly instead of returning unknown.
ClientToServerMessage.share contains the user's email on every request.
This eliminates the need for LD_PRELOAD account mapping to identify
users — the server can now work correctly without the payload proxy.
Chrome sends the signed-in account email in ClientToServerMessage.share
on every request. This eliminates the need for LD_PRELOAD injection,
HTTP proxy, and Preferences file mapping entirely.

- Remove crates/payload/ (LD_PRELOAD .so, HTTP proxy, account mapping)
- Remove docs/account-mapping.md
- Server reads email from msg.share, falls back to anonymous@localhost
- Remove auth middleware (no longer needed)
- Remove tower dependency
- Update CLAUDE.md and README.md
@loyalpartner loyalpartner merged commit 09010cc into master Apr 16, 2026
1 check passed
loyalpartner added a commit that referenced this pull request Apr 18, 2026
* refactor: lazy-load account mapping on cache miss instead of startup

Previously the cache_guid → email mapping was built once at Chrome
startup, before sync initialized — so cache_guid didn't exist yet
and the mapping was always empty on first run.

Now the proxy scans Preferences files on demand when a client_id
is first seen, then caches the result. Works correctly for:
- First-time sync (cache_guid appears after sync init)
- Multiple profiles (scans all Profile dirs on miss)
- New accounts added mid-session

* fix: fallback to single-account email when cache_guid not yet in Preferences

Chrome generates cache_guid in memory and starts syncing before writing
transport_data_per_account to disk. For profiles with a single logged-in
account, use that email directly instead of returning unknown.

* feat: read user email from protobuf share field instead of header

ClientToServerMessage.share contains the user's email on every request.
This eliminates the need for LD_PRELOAD account mapping to identify
users — the server can now work correctly without the payload proxy.

* refactor: remove LD_PRELOAD payload, use protobuf share field for auth

Chrome sends the signed-in account email in ClientToServerMessage.share
on every request. This eliminates the need for LD_PRELOAD injection,
HTTP proxy, and Preferences file mapping entirely.

- Remove crates/payload/ (LD_PRELOAD .so, HTTP proxy, account mapping)
- Remove docs/account-mapping.md
- Server reads email from msg.share, falls back to anonymous@localhost
- Remove auth middleware (no longer needed)
- Remove tower dependency
- Update CLAUDE.md and README.md

* docs: remove LD_PRELOAD references from README and architecture docs
@loyalpartner loyalpartner deleted the inject branch April 18, 2026 01:44
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