Feature #5530

use OrbotStatus receiver callbacks to ensure Orbot is running

Added by n8fr8 over 2 years ago. Updated over 1 year ago.

Status:ClosedStart date:07/21/2015
Priority:NormalDue date:
Assignee:hans% Done:

0%

Category:-
Target version:Orfox Beta 1
Component:

Description

via NetCipher OrbotHelper, ORfox can receive callbacks on the Orbot/Tor status. We should think about how to use these to improve the Orfox user experience.

Associated revisions

Revision f02187c1
Added by Hans-Christoph Steiner over 2 years ago

rename mozconfig so its clear it is custom for Orfox, and not Fennec

closes #5530 https://dev.guardianproject.info/issues/5530

Revision b0b6d8fe
Added by Hans-Christoph Steiner over 2 years ago

merge: remove Tab:Load event queuing and only use Intent queuing

Tab:Load queuing is too flaky, since the Fennec UI will block waiting for
Gecko to confirm that it received the event. For more on this:

refs #5530 https://dev.guardianproject.info/issues/5530
https://lists.mayfirst.org/pipermail/guardian-dev/2015-September/004499.html

History

#1 Updated by hans over 2 years ago

Orfox now includes NetCipher integration that automatically sends ACTION_START Intent to Orbot, and receives Orbot's status broadcasts as well. It currently will queue URL load requests, aka Tab:Load mozilla events, until Orbot says it has started. This approach might make it difficult to handle error conditions since the Fennec GUI does a blocking wait until Gecko received the Tab:Load.

When Orfox first starts up and sends the ACTION_START Intent to Orbot, there is a small window in time where Orfox has sent the Intent but not received a reply yet from Orbot about the Tor status. So it tries to connect, and then shows the "Proxy failing" page. This could probably be handled by ensuring that the tor status in Orfox is set to STATUS_OFF by default then making sure to check the status before trying to load anything from the network.

#2 Updated by hans over 2 years ago

  • Status changed from New to In Progress
  • Assignee set to hans
  • Target version changed from Orfox RC to Orfox Beta 1

#3 Updated by hans over 2 years ago

from https://lists.mayfirst.org/pipermail/guardian-dev/2015-September/004499.html

Orfox was working pretty well in general as a browser. Amogh added NetCipher
to get the automatic Tor starting. That started Orbot fine, but Orfox errored
out on any websites that it tried to load while waiting for Orbot to start
Tor. So I implemented an approach that makes the orbot starting stuff
transparent, and tries to make Orfox transparently hold loading any pages
until Tor is ready. This used the internal Fennec event "Tab:Load". The
problem with that approach is that the Fennec UI blocks and waits for the
Gecko engine to respond to any "Tab:Load" messages that have been sent.

I also tried queuing incoming Intents that cause a web page to be loaded, but
that only works for new URLs coming in. If Orfox is not running, then it is
started and wants to load a few tabs from the previous session, those will all
show the failure to connect page since they are not being started by Intents,
but rather the internal Tab:Load messages.

I also thought about just going back to the old Orbot start Intent that
launched Orbot itself, but upon thinking about that, I think it would really
handle error conditions badly, like when Orbot fails to start properly,
because going to Orfox would always just redirect to Orbot.

Now, I'm thinking the best approach includes two key pieces:

  • remove the Tab:Load queuing that is there now, and switch back to the Intent
    queuing method I had going before.
  • update the "proxy connection failed" page so that it shows the Tor status
    (OFF/STARTING/ON/STOPPING) That page will also include the "Try Again" button
    that is there. Also, when STATUS_ON is received from Orbot, that page can
    automatically try again. We should probably also add a button that brings up
    the Orbot main screen so that users can easily troubleshoot the Tor connection
    in Orbot.

#4 Updated by Anonymous over 2 years ago

  • Status changed from In Progress to Resolved

Applied in changeset orfox|commit:f02187c10cfb4df1a5dfa5cb9c20a6cd78b59352.

#5 Updated by n8fr8 over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF