I would prefer to use stunnel, which I used for 10 or 20 years until recently, but this proxy is supposed to work for the new problem:
SIMON ROB'S EMAIL-OAUTH2-PROXY
Go to https://github.com/simonrob/email-oauth2-proxy/releases
Download emailproxy-YYYY-MM-DD_pyinstaller-Windows.zip from the most recent release.
Unzip the emailproxy-YYYY-MM-DD_pyinstaller-Windows.zip file, extracting the contents to the desired location; avoid the protected system folders such as "Program Files", "Program Files (x86)", etc.
Right-click each extracted file, go to Properties, and enable "Unblock".....
Write me at traveler@mm.st if you want me to post the rest of the instructions. Maybe experienced people don't need them. I havent' tried to install either this or stunnel yet.