[tor-bugs] #29080 [Applications/Tor Browser]: Merge OrbotService and TOPL

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Jan 14 07:05:21 UTC 2019


#29080: Merge OrbotService and TOPL
-------------------------------------------------+-------------------------
 Reporter:  sisbell                              |          Owner:  tbb-
                                                 |  team
     Type:  defect                               |         Status:  new
 Priority:  Medium                               |      Milestone:
Component:  Applications/Tor Browser             |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tbb-mobile, TBA-a3,                  |  Actual Points:
  TorBrowserTeam201901                           |
Parent ID:  #27609                               |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by sisbell):

 I've done an initial (ugly) merging of TOPL and orbotservice so have
 enough to identify the specifics.

 Changes to TOPL

  * The !OnionProxyManager should be able to set the !EventHandler, rather
 than use the default one. Need to add a field to the !OnionProxyManager
 allowing us to pass in the custom !EventHandler that we will use.

  * Currently only supports configuring one hidden service. Add support for
 multiple hidden services through !OnionProxyManager.publishHiddenService

  * Add fields to the !TorConfig builder: ServerDNSResolvConfFile,
 !ExitNodes, Bridge, NEWNYM, Socks5ProxyUsername, Socks5ProxyPassword,
 !ProxyAuthenticator, !ClientTransportPlugin, !ReachableAddresses,
 !ExcludeNodes, !EntryNodes, !AutomapHostsOnResolve, DNSPort,
 HTTPTunnelPort

  * Add support for writing DNS File (resolv.conf)

  * Add support for loading bridges from resource file

 Changes to OrbotService
 * TorEventHandler - Orbot delegates sending of Android broadcasts to the
 TorService. We can decouple this by sending the broadcasts directly. This
 interface integrates with the same one that TOPL uses and can be
 configured through the OnionProxyManager with the fix defined above. [Easy
 fix]

 * TorService - this is a 2K line uber class.
   - Dozen or so broadcast messages that the main app will display to user.
 Need to replicate these where is makes sense
   - HiddenService Content DB - writes out to torrc. Break into its own
 class (possibly auto-generate)
   - Client Cookie DB - writes out to torrc. Break into its own class
 (possibly auto-generate)
   - VPN - we can port this directly
   - Clean circuits - a pending intent through a notification on service
 startup (NEWNYM)
   - Create Notifications for Network connectivity - this exists in TOPL
 but does not create notif
   - Start/Stop tor - we can use TOPL OnionProxyManager.start and
 OnionProxyManager.stop method to replace this feature
   - Tor Installer - we can use the one from TOPL
   - Handle events sent to service: ACTION_START, ACTION_STATUS,
 CMD_SIGNAL_HUP, CMD_NEWNYM, CMD_VPN, CMD_VPN_CLEAR, CMD_SET_EXIT
   - Various torrc config params that mirror TOPL
   - Loads Bridges from resource file

 Most of the work is simply taking everything from the Content DB and prefs
 and adding fields to torrc. The DB need to be rewritten. This should all
 be done in a separate package/set of classes, not in the TorService class.

 The new TorService will:
 * delegate to TorConfig package when generating torrc from prefs/DB
 * delegate to the OnionProxyManager for the start/stop of tor.
 * delegate to the AndroidResourceInstaller (TOPL) for installing tor
 * delegate to TOPL Config for loading bridges
 * handle incoming events AND outgoing notifications.
 * handle VPN configuration

 Integration:
 TOPL will be an android library. OrbotService will use TOPL. We can create
 patches for both projects and then integrate into tor-browser-build. The
 main Orbot app shouldn't require any changes as we can support the
 existing interfaces and broadcasts.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29080#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list