Foundation-Devices / tor

Tor plugin for Flutter
https://pub.dev/packages/tor
GNU General Public License v3.0
15 stars 6 forks source link

Multiple simultaneous Tor connections/routes #33

Open sneurlax opened 4 months ago

sneurlax commented 4 months ago

Hi @icota, I have been wondering about using this plugin to use multiple connections/routes simultaneously. Do you think this is feasible?

An example use case would be for multi-coin wallets which would want to connect to multiple different backend servers with their own independent Tor connections.

If this isn’t currently possible I’d be happy to help contribute towards achieving that functionality.

Thanks for reading!

icota commented 4 months ago

@sneurlax I think this is necessary for more than just for your multiple backend use-case. For instance, one could, to improve Tor reliability, keep multiple routes/connections, check their health periodically and access (stateless) services only through the healthy ones.

But to get there we only need to get rid of the singleton pattern? In that case the user of the plugin has freedom to do above.

At first glance seems pretty simple. LMK if it's not :)

sneurlax commented 4 months ago

OK, I'll try to it sometime :) it's just at the level of personal project for now, so we'll see what after-hours hacking gets us!