Repository navigation
feat: support Firefox Flatpak native messaging - #174
Merged
Merged
Conversation
Add `tailchrome install --firefox-flatpak` / `uninstall --firefox-flatpak`. The helper is staged inside ~/.var/app/org.mozilla.firefox and the manifest is written to the sandbox's ~/.mozilla/native-messaging-hosts, so no `flatpak override --filesystem=home` is needed. The Chrome Flatpak installer is generalized over a browser target and keeps its ownership, locking, and rollback guarantees. A helper launched by Firefox Flatpak now keeps node state in the sandbox's XDG config directory. The Flatpak smoke script and workflow now cover Chrome and Firefox. Closes #163
Closed
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
tailchrome install --firefox-flatpakandtailchrome uninstall --firefox-flatpakfor Flatpak Firefox (org.mozilla.firefox).~/.var/app/org.mozilla.firefox/tailchrome/host/tailchrome, and the manifest is written to~/.var/app/org.mozilla.firefox/.mozilla/native-messaging-hosts/com.tailscale.browserext.firefox.json. Inside the sandbox, Firefox sees that folder as~/.mozilla/native-messaging-hosts.--extension-dirstays Chrome-only.hostStateDirnow recognizes both Flatpak app IDs, so a helper started by Firefox Flatpak keeps node state in~/.var/app/org.mozilla.firefox/config/tailscale-browser-ext.scripts/test-flatpak.shtakeschrome|firefox, andflatpak-smoke.ymlruns both.docs/helper-installation.md, plus small updates to the docs that mention Chrome Flatpak.Why
Closes #163
The workaround in the issue needs
flatpak override --filesystem=homebecause the manifest points at the native helper, which sits outside the sandbox. Staging the helper inside the app directory, as Chrome Flatpak already does, avoids widening the sandbox.Users already on the workaround: the installer won't overwrite a manifest it doesn't own, so they have to delete the copied one first. Their node state also moves into the sandbox, so they sign in once more. Both are covered in the docs.
How to Test
go test ./...passes on Linux (container, non-root) and macOS.go vetpasses for both OSes.procRunningandpong.tailchrome install --firefox-flatpak, then reopen Firefox and confirm the popup connects, login works and traffic is routed. Then runtailchrome uninstall --firefox-flatpakwith Firefox closed.Checklist