guardianproject / orbot

The Github home of Orbot: Tor on Android (Also available on gitlab!)
https://gitlab.com/guardianproject/orbot
Other
2.27k stars 338 forks source link

Fix app selection #1206

Open pipcet opened 6 days ago

pipcet commented 6 days ago

I was quite shocked today when I enabled an app in the Orbot app selector, only to find out it hadn't been torified.

There are two problems with the current code:

  1. When "back" or the left arrow are used in the app selection "activity", all apps you added to the torified app list are forgotten. This means users are running unsecured apps rather than torified ones. That's a severe bug.
  2. When you figure out that you have to hit the "save" button, you might think that actually makes the settings take effect. No. You have to leave the app selector activity using the "back" button (after hitting "save") for the app to finally be added to the VPN. This means if you select an app, "save", and then switch to the app, it won't be torified. That's another severe bug.

I really don't think there's any excuse to display a checked checkbox next to an app logo unless that app is actually running torified at that very moment. I think we can agree that is a problem that needs to be fixed, even if we disagree about whether I've chose the right way to fix it.

My fix is to remove the "save" button entirely and simply restart the VPN synchronously whenever a checkbox changes. This doesn't seem to cause noticeable delays, but even if it were to cause them, they're necessary, because we really don't want the user to falsely believe they're running through Tor when they're not.

Again, I'm happy to find another way to solve this

pipcet commented 6 days ago

Sorry, I realized my bug report was incorrect in that "SAVE" automatically returns from the activity. So point 2 isn't necessarily valid. My apologies.

n8fr8 commented 4 days ago

Thanks for the report and effort to improve this area. We will review and consider!