GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor: replace the archived rookie crate with a native chrome cookie reader by clearloop · Pull Request #228 · clearloop/leetcode-cli

Conversation

@clearloop

@clearloop clearloop commented Jun 24, 2026

Copy link
Copy Markdown
Owner

What

Replaces the archived rookie crate with a small native reader for Chrome's cookie store in src/plugins/chrome.rs. leetcode-cli only needs two cookies (LEETCODE_SESSION, csrftoken) from one browser, so this reuses the SQLite already pulled in by diesel to read the cookie DB and implements Chrome's value decryption directly.

Why

rookie is archived and a little rough (its build script unwrap()s git rev-parse, which panics in environments without git). More importantly it pulled a second SQLite client (rusqlite) onto the shared libsqlite3-sys, plus dbus (zbus/zvariant) and aes-gcm. Reading the cookie DB through diesel collapses that to a single SQLite stack and drops the dbus linkage.

Result

  • One SQLite client (diesel only); bundled stays active via the explicit libsqlite3-sys dependency.
  • Dependency tree drops from 594 to 517 entries and Cargo.lock shrinks by ~1.5k lines; adds four small crypto crates (aes, cbc, pbkdf2, sha1).
  • No more zbus/dbus linkage.

Platforms

Automatic Chrome cookies work on macOS and Linux (Keychain / Secret Service password -> PBKDF2-SHA1 -> AES-128-CBC). On Windows, Chrome's DPAPI + AES-GCM (and app-bound encryption on Chrome 127+) isn't implemented yet, so Windows falls back to manual csrf/session in the config. README and docs/cookies.md are updated accordingly.

Testing

cargo build, cargo clippy --all-features, and cargo fmt --check pass, and a clean Linux build with no system libsqlite3 still produces a self-contained binary. The decryption follows Chrome's documented scheme but has not been smoke-tested against a live Chrome profile yet — worth a manual check before relying on it.

Notes

This came out of the #226 SQLite build investigation and removes the second SQLite stack, but it does not by itself fix the AUR build failure reported there.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@clearloop
refactor: replace the archived rookie crate with a native chrome cook…
51b5f84
…ie reader
@clearloop clearloop mentioned this pull request Jun 24, 2026
Release 0.5.1 and 0.5.2 fail to build #226
Closed
@clearloop
chore: bumps version to 0.5.3
800be9d
@clearloop
clearloop merged commit deb8483 into main Jun 25, 2026
3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@clearloop
clearloop deleted the feat/native-chrome-cookies branch June 25, 2026 09:32
@clearloop clearloop mentioned this pull request Jun 29, 2026
fix: link the system sqlite instead of bundling it #231
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@clearloop
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.