Add Zen Browser support - #118
Open
jeremy-albinet wants to merge 1 commit into
Open
Conversation
Zen (https://zen-browser.app) is a Firefox fork that keeps its own profile tree separate from Firefox's, so kooky's existing Firefox finder never discovers it. Adds a browser/zen package registered as a CookieStoreFinder, plus a zenRoots profile-root discovery function (mirroring firefoxRoots) per platform: - macOS: ~/Library/Application Support/zen - Windows: %AppData%\zen - Linux: ~/.zen (tarball/AUR), ~/.var/app/app.zen_browser.zen/.zen (Flatpak), and ~/.config/zen (newer XDG-following builds, zen-browser/desktop#12366) Zen's profiles.ini is Firefox's format verbatim, and its cookies.sqlite and sessionstore.jsonlz4 use the same schema, so this reuses FindProfiles/FindProfilesInRoot and CookieStoresForProfiles as-is — only the root-discovery layer is new. Verified against a real Zen install: correctly discovers the profile, reads user_session/__Host-user_session_same_site from cookies.sqlite, and picks up sessionstore-backups cookies the same way Firefox does. Cross-compiled clean for darwin/linux/windows (amd64+arm64) and android/arm64.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds Zen Browser as a supported
CookieStoreFinder.Zen is a Firefox fork that keeps its own profile tree, separate from Firefox's, so kooky's existing Firefox finder never discovers it, even though Zen writes
profiles.ini,cookies.sqlite, andsessionstore*.jsonlz4in Firefox's exact formats.Approach
browser/zenpackage, followingbrowser/firefox's pattern exactly: aCookieStoreFinderthat callsfirefox.CookieStoresForProfiles— so it gets both the SQLite cookie store and the session-restore cookie store for free.zenRootsininternal/firefox/find, mirroringfirefoxRoots, covering:~/Library/Application Support/zen%AppData%\zen~/.zen(tarball/AUR, current default),~/.var/app/app.zen_browser.zen/.zen(Flatpak), and~/.config/zen(newer XDG-following builds tracked in How to move zen config to use new XDG Base Directory? zen-browser/desktop#12366, currently Twilight-only)%AppData%\zenpath via the existingwindowsx.IsWSL()checkfind.FindZenProfiles()alongside the existingFindFirefoxProfiles(), reusingFindProfiles/FindProfilesInRootunchanged since the ini format is identical.Testing
go build ./.../go vet ./...clean.~/Library/Application Support/zen/Profiles/, readsuser_session/__Host-user_session_same_sitefromcookies.sqlite(labeledbrowser=zen), and also picks up cookies fromsessionstore-backups/recovery.jsonlz4, matching Firefox's existing fidelity.go test ./...) is unaffected.Context
Filed after adding Zen support to a downstream tool (drogers0/gh-image) whose README already documents a manual
sqlite3-based workaround for unsupported Firefox forks — this closes that gap for Zen specifically.