Repository navigation
Conversation
Tuta has no IMAP, so a small Rust helper built on Tuta's own SDK speaks to it and talks to Hylki as JSON over stdin. The Flatpak, RPM, deb and AppImage builds compile it and install it next to hylki, and CI tests it.
A Tuta account signs in with its password and authenticator code through the bundled helper, which keeps only a session in the keyring. Mail syncs by polling, bodies decrypt locally, and sending goes to outside addresses. A send whose outcome is unknown is never retried.
native/tuta/prepare.sh prepares the Tuta SDK, then applies three small patches carried here: recipient key data for encrypted sends through the SDK's own key facade, decrypting service replies with the request's key, and entity PATCH. Every build path runs it.
Mail to Tuta addresses now goes end-to-end encrypted, as in Tuta's own apps. Folders can be created, renamed and deleted, tags map to Tuta labels, drafts and templates live on the server, mail can be deleted for good, imported, snoozed and undone, replies thread, and new mail is pushed instead of polled.
A bundled Go helper speaking JSON over stdin signs in with SRP and TOTP, syncs folders and pages, decrypts messages to MIME, marks read, moves, sends with Proton's per-recipient packages, and revokes the session. It never reports a send it cannot confirm as sent.
The Go helper is built offline from its vendored modules in the Flatpak, RPM, deb and AppImage builds and installed next to hylki, and CI tests it on both architectures.
Proton Mail works without Bridge: the bundled helper signs in with SRP, an authenticator code, a mailbox password and Proton's human verification when asked, keeps only a rotating session in the keyring, syncs through Proton's event stream and sends with Proton's own encryption. The Bridge preset is unchanged.
hanthor
force-pushed
the
feat/proton-native
branch
from
November 5, 2026 16:08
a809e8f to
e69a137
Compare
Owner
|
Appreciate the PR but I am going to decline the merge. Proton Bridge is the proper and safest way of interacting with Proton Mail how the devs intended. Hylki fully supports Bridge. |
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.
Adds Proton Mail as a native account type, next to the existing "Proton Mail (Bridge)" preset, which is unchanged.
This builds on #584 (Tuta). It reuses that PR's helper client, sign-in flow and uncertain-send handling, so the first two commits here are #584's. Only the five
protoncommits are new. I'll rebase once #584 is settled.Why offer this after #335
#335 asked for native Proton, and was closed with "Bridge is the correct way of doing this that maintains Proton's security infrastructure", alongside a fair worry about unaudited crypto. This PR tries to answer both points rather than argue with them.
hylki-proton, built on Proton's own libraries: go-proton-api for the API and SRP sign-in, and gopenpgp for keys and messages. The revision is the one Proton Bridge pins today. The per-recipient send rules are a port of Bridge's own table. Keys are unlocked in the helper and nowhere else.If you'd still rather not carry it, that's understood; we'll keep it in our fork.
What works
https://*.proton.me, with its own ephemeral session and settings, separate from the mail reader.Limits
Testing
go testagainst go-proton-api's in-process server covers:mainin the SDK sandbox.PROTON_LIVE*, with a pre-solved challenge) is ready and will be run before this leaves draft.Written with AI assistance, like #584.