Skip to content

Instantly share code, notes, and snippets.

@trungly1
trungly1 / proton-expose.md
Last active December 6, 2025 04:09
ProtonBridge Headless Mode

Source: https://ndo.dev/posts/headless_protonbridge All credits go to the author

Proton Mail is a great web email service, but if you've landed here, you've probably run into their lack of support for SMTP. They offer a local bridge application which is designed to run in a desktop environment and enable you to use your Outlook, Thunderbird, etc. email client on that same local computer with your Proton Mail account. However, if you'd like to access your Proton Mail email via another email client on your mobile device or another computer where you can't run their bridge application - that is not supported. This was incredibly frustrating so I figured out how to compile their bridge application without the GUI dependencies in order to run it on any Linux server and expose SMTP / IMAP ports for you to consume from your email client of choice.

Challenges

There are a few challenges here that we've got to overcome to enable using the proton-bridge project in this way:

  1. Application by default requires
@trungly1
trungly1 / localListen.py
Created May 30, 2025 02:46
local listener in python
import sys
import time
import socket
import psutil
import httplib
import webbrowser
from time import sleep
from subprocess import Popen, PIPE
from subprocess import check_output

If we take a step back, a new thirdPartyReference is required anytime you attempt to submit a POST request from Online Orders endpoints. This thirdPartyReference can be any string, such as a random UUID.

Let's take my current payload:

As we can see, I'm using eb9b8ffd-3aa6-4b6d-a3cd-8886048ecd23 as my thirdPartyReference. From there, I have two options:

  1. Wait for the webhook notification; which is the recommended workflow since it contains the order status (fail, success) and the outstanding amount ("currentAmount" minus "paidAmount") and the "ikentooAccountIdentifier"(to be used with the apply payment endpoint when applicable):
{
"iKaccountId": 0,
"iKaccountIdentifier": "A111584.1",
"thirdPartyPaymentReference": "2cb120b2-5ce2-4543-b4be-e6021628a906",
"endpointId": "webOO",
"businessLocationId": 881782555672578,
"taskTtlInMs": 60000,
"staffId": null,
"deviceId": null,
"paymentMethod": "APM",
{
"iKaccountId": 0,
"iKaccountIdentifier": "A111584.1",
"thirdPartyPaymentReference": "{{$randomUUID}}",
"endpointId": "webOO",
"businessLocationId": "{{businessLocationId}}",
"taskTtlInMs": 60000,
"staffId": null,
"deviceId": null,
"paymentMethod": "APM",
@trungly1
trungly1 / webhook.json
Created April 9, 2025 18:05
webOO event
{
"thirdPartyReference": "eb9b8ffd-3aa6-4b6d-a3cd-8886048ecd23",
"businessLocationId": 881782555672578,
"type": "ORDER",
"status": "SUCCESS",
"account": {
"clientCount": 0,
"uuid": "1b157547-59ae-4900-803c-43c58cc5aa55",
"openDate": "2025-04-09T17:20:48.204+0000",
"paidAmount": "23.00",
{
"businessLocationId": 881782555672578,
"thirdPartyReference": "eb9b8ffd-3aa6-4b6d-a3cd-8886048ecd23",
"endpointId": "webOO",
"customerInfo":{
"firstName": "J",
"lastName": "S",
"email": "no-reply@norereply.com",
"contactNumberAsE164": "+16145555555",
"notes": "Frequent flyer",

Très bien, voici les représentations de l'anion phosphate (PO₄³⁻) :

1. Formule moléculaire (ou ionique)

  • PO₄³⁻

2. Formule semi-développée

  • Pas de formule semi-développée conventionnelle pour un ion polyatomique. On pourrait écrire [PO₄]³⁻.
@trungly1
trungly1 / anionsulfate.md
Last active February 17, 2025 16:08
anionsulfate

Voici les représentations de l'anion sulfate (SO₄²⁻) :

1. Formule moléculaire (ou ionique)

  • SO₄²⁻

2. Formule semi-développée

  • Il n'y a pas vraiment de formule semi-développée standard pour les ions polyatomiques comme le sulfate. On pourrait le représenter comme [SO₄]²⁻ pour insister sur la charge.
@trungly1
trungly1 / guide.md
Last active February 12, 2025 00:35
Main CSS Stylesheet

I'll create a separate CSS file with all the styling from our previous pages to maintain consistency across your application.

I've created a comprehensive CSS file that includes:

  1. CSS Variables for consistent theming:
    • Colors
    • Background colors
  • Text colors