Problems Handling Multiple Accounts
BobsUncle opened this issue · comments
Hey vlad, first of all great work thanks for sharing.
I currently have your software deployed in following configuration:
- 4 x Protonmail accounts (separate identities)
- All are accessed via the onion site/tor gateway
Problem: Each account is constantly logging back out and logging back in automatically. It happens every 90 seconds. One account will login the other will log out. This is probably not good because unless it is a bug it means the Protonmail server is logging you out which means isolation between accounts is not good.
Also I am wondering can you give option in future update to set specific proxy parameter for each account? That was a person managing multiple accounts can implement stream isolation via TOR so each account has a different circuit. Just requires ability set IP and PORT.
FYI. I am using this app on Debian 9 (whonix workstation).
Thanks
- Can you confirm the app works well with your setup if you use only one account?
- Does it work well if you map your browser to Tor and login into several accounts?
It happens every 90 seconds. One account will login the other will log out. This is probably not good because unless it is a bug it means the Protonmail server is logging you out which means isolation between accounts is not good.
I know there are users who go with multiple accounts and so far there was no such kind of issue revealed you describe. But still, there is a way to enable better account isolation.
set specific proxy parameter for each account
I think it's feasible.
-
Build with improved accounts isolation is uploaded here. Does it work better with your setup?
-
The new build also supports configuring proxy per account. Can you confirm it works as expected?
Hi Vlad,
I tried downloading from the dropbox link but the link is no longer valid.
I look forward to testing out the changes.
Thanks
* Can you confirm the app works well with your setup if you use only one account?
Yes, works fine with just one account
* Does it work well if you map your browser to Tor and login into several accounts?
You mean one tor browser instance but multiple tabs? No that does not work fine it also risk the accounts being suspended because it does not isolate (cookies, etc) each tab.
I tried downloading from the dropbox link but the link is no longer valid.
I removed the dropbox links as recently published v3 release includes new changes.
I'd ask you to try the app:
- with one account first
- then with several accounts (the original case)
- and then using the proxy
I know there are users who go with multiple accounts and so far there was no such kind of issue revealed you describe. But still, there is a way to enable better account isolation
I think full and proper isolation is imperative. The app should come with a warning that it is not designed for identity or isolation if these features you speak of for isolation are not yet implemented so any other users not might make same mistake i make.
I tried downloading from the dropbox link but the link is no longer valid.
I removed the dropbox links as recently published v3 release includes new changes.
I'd ask you to try the app:
* with one account first * then with several accounts (the original case) * and then using the proxy
OK I will test it out now and report back!
When I enable proxy it is not working. I entered it as IP:Port (since no field specific for port). I entered it like "127.0.0.1:9052"
Perhaps it does not work with Socks 5 proxy?
OK it should be entered like this socks5://10.152.152.10:9180
OK it should be entered like this socks5://10.152.152.10:9180
Yep, see the documentation link near to the field. I think it's quite flexible.
Everything seems to be working beautifully. I'll keep you updated.
Vlad, can you explain a little how isolation is implemented in this new version between different accounts?
FYI: (possibly unrelated) I just added six accounts total and hit a "ENOMEM, Cannot allocate memory" error.
- How much RAM do you have?
- Is local store option enabled and initial syncing got finished?
- If so, are there a lot of emails in your account?
- If so, what is the
database.bin
file size?
See here how to save some memory #108
See here how to enable extended logs if you are going to send them to me #110
Vlad, can you explain a little how isolation is implemented in this new version between different accounts?
I enabled individual in-memory sessions for each account. Before that, the default single session was used for everything.
- I am using a bare-bones debian 9 VM with 1536 RAM.
- Local store is setup for everyone and yes sync was finished i think except for one account (the account i just added when the error popped up). The app continued just fine and loaded everything including from the new account.
- No, not a lot of emails.
- 10.6MB
Everything is working a lot smoother now the new v3 update.
How do you disable the full text search option? That sounds like what I need to do.
Hey, just for the record, i sounds like i have EXACTLY the same setup as @BobsUncle , and also exactly the same issues.
I'll try electronmail v3 now to see if it resolves
EDIT: electronmail 3.0 seems to work like a charm 👍
PS: i loved the 'per account proxy' feature
Thank you @vladimiry !
Closing as resolved.
I think a very simple way to get stream isolation is to use the protonmail onion server for one account and the surface web for the other account. It only works for protonmail and only if you have two accounts, but for that case it's much simpler and easier to trust than multiple proxy ports. I say trust because there is no concern for whether the isolation code works because the surface web must use an exit node, and the onion server needs no exit node.
I'm a bit fuzzy on why account-dependent ports are needed. Is that a whonix particular need? It seems IsolateDestAddr
and IsolateDestPort
tor options are applied to the proxy port, and then all traffic through that port gets stream isolation. So all accounts can be configured to use the same SOCKS port, no?
I'm a bit fuzzy on why account-dependent ports are needed. Is that a whonix particular need? It seems
IsolateDestAddr
andIsolateDestPort
tor options are applied to the proxy port, and then all traffic through that port gets stream isolation. So all accounts can be configured to use the same SOCKS port, no?
No, because "IsosolateDestAddr" and "IsolateDestPort" will pick a different route for each different "IP:PORT" tuple.
So using the same proxy port for' let's say tutanota and protonmail will lead to different routes, but the same route will be used to 2 tcp streams to "protonmail.com:443".
Note that whonix has pre-defined alternative open ports that will lead to different routes.
Take a look at "/usr/share/tor/tor-service-defaults-torrc".
Therefore using .onion for all already provides stream isolation, as all tcp connexions from an onion service are viewed as comming from 127.0.0.1 for servers, so there is no difference between, your first onion, your second onion, any worldwide protonmail's onion users.
The only issue would be a correlation attack by protonmail based on connection/disconnection time from multiple accounts. Note that it also applies if you use different tor routes (clearnet stream isolation).
That's why a randomized & delayed connection or something similar would be greatly appreciated as a future feature of Electronmail (@vladimiry)
That's why a randomized & delayed connection or something similar would be greatly appreciated as a future feature of Electronmail (@vladimiry)
This is being discussed here and planned for implementing.
Here is brief info of how to use Tor v3 Proton address API entry point on Windows:
- Install the Tor Browser package. Get here https://www.torproject.org.
- Locate the
tor.exe
somewhere in your program files. Then runtor.exe | more
in cmd.exe console or.\tor.exe
in PowerShell console and wait until bootstrapping completed (you should see the log lines get printed to console). The default on-the-fly config will be used as we didn't specify the custom one. If you need to you could look up on the internet how to use a custom Tor config, how to set up Tor as a hidden Windows service, etc. - In the app select the "Tor version 3 address" option from the "API entry point" input control (the option previously was named as
"https://protonirockerxow.onion/"
but got renamed during moving to Tor v3 Proton address). - In the app specify
socks5://localhost:9050
as a proxy address for the account. The respective/proxy form input control is hidden under the collapsed by default"Advanced Options"
block.
Referencing this info with #146.
- Run
tor.exe
in the console and wait until bootstrapping completed
OK - I believe I finally, actually, found the answer. Ha-ha! So, I began to have issues with logging in to the onion site again. After much searching, I found out what the issue with Tor and Windows is. Launching tor.exe in a console will, indeed, run tor.exe as a Windows background service but with no console output. Regardless of waiting a few minutes, onion log-in was refused, including repeated attempts. Why the onion site refused to connect after doing this, I don't know. But after killing the tor.exe service, I ran this command: tor.exe | more
found on Tor Stack Exchange here. After the console output had finished, I attempted to log in again, and holy universe! It worked! Geez! 🤯
NB: Windows users have to pipe any tor.exe
command to more
for console output. Eg: tor.exe -h | more
, tor.exe --version | more
.
I was going to put this under issue #395 but thought it would be better here.
NB: Windows users have to pipe any tor.exe command to more for console output. Eg: tor.exe -h | more, tor.exe --version | more.
It was not like that when the original message was written since I performed the stuff before writing the message. Also I guess "piping" stuff is not supported by old windows console like cmd.exe but powershell only. Editing the original message.
I can't say regarding Windows 7, but on Windows 10 I used those commands with cmd.exe. 🤷
I can't say regarding Windows 7, but on Windows 10 I used those commands with cmd.exe. shrug
I've changed the original message accordingly, you certainly know better how cmd.exe works being windows user.
I hope I'm not being an annoying gnat here. 😄 I wanted to let you know (and yeah, I should have tried this before), that I just tried the command in PowerShell and this works: .\tor.exe
without any piping. I guess sometimes PowerShell is superior to CMD.
@lucknaumann does it work with piping in powershell? There better be unified way.
@vladimiry Yes, it does, but it is not unified because PS uses a dot slash to launch programs, which won't work in CMD. You could put CMD use: tor.exe | more
and PS use: .\tor.exe
. The rest is the same.
The reason for this lies in the tor.stackexchange.com thread I linked to above, which has a link to a Tor-CMD bug (GitLab issue). Basically, tor.exe originally launched without a hidden CMD window, so they made it hidden. But people wanted a way to see console output on demand, so they included the pipe command. It seems to be strictly CMD-related. This could be because PS works differently, or its default is to use CMD. Probably the latter.
Ok, added both options to the original message.
Ok, added both options to the original message.
I noticed a typo: Then tun [run] tor.exe | more
in cmd.exe console... 😃