But why isn't Amethyst still using the Tor lib even when it is instructed tonuse Orbot? I think Amethyst should simply remain disconnected innthat situation, and not start its own proxy?
Discussion
Because there is no way to know if Tor is running or not. The only way is to start the proxy and see what the lib returns.
But why would it need to know if Tor is running? It should simply be based on the "Active Tor Engine" setting, no? I.e. when set to Orbot, never attempt to start the proxy, but attempt to start ot if set to Internal?
When the app starts, it access several things before the user is logged in. Since we did the privacy preference per account, there is no preference when the app is still logging the user in. In that short time, Tor is running. But it will close after that once the user logs in.
That being said, I think a version of Tor will always be required moving forward. There are just too many things in Nostr that need a Tor connection to access, like onion urls and so on.
I think it makes sense to have the privacy options per account, but could the "Active Tor Engine" and "Orbot SOCKS port" be app-wide maybe?