Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't download Tor binaries until a new Private Tab with Tor is opened #9177

Closed
bsclifton opened this issue Apr 13, 2020 · 5 comments · Fixed by brave/brave-core#6081
Closed

Comments

@bsclifton
Copy link
Member

Description

With new installs of Brave, we register the platform specific (Windows, macOS, Linux) Brave Tor Client Updater component with Component Updater. Users will hit our go-update service to fetch these binaries which can cause a few problems:

  1. Without user even opening a new Private Tab with Tor tab, they have the Tor executable installed on their machine in their profile directory. Some enterprise software will flag this as "potentially malicious".
  2. Downloads and subsequently updates are pushed to all users even if they're not using the feature.
    • 2a. This puts additional stress on the go-update service
    • 2b. There is a bandwidth cost for this too

I'd like to propose NOT downloading the software until a new Private Tab with Tor is opened. This would basically mean not registering the component with Component Updater until that happens. When this feature IS used, the user would then have a worse experience (would need to wait for initial download / unzip / install) on their first run. Subsequent runs would be just fine and the software would stay up to date. We might be able to show a progress bar or another interstitial page while download is happening

cc: @rebron @w0ts0n @bbondy @kjozwiak

@kjozwiak
Copy link
Member

When this feature IS used, the user would then have a worse experience (would need to wait for initial download / unzip / install) on their first run. Subsequent runs would be just fine and the software would stay up to date. We might be able to show a progress bar or another interstitial page while download is happening.

Agreed, we'll need some type of indicator that the binary is being actually being downloaded as some users on slower connections might think the feature is completely broken. Maybe having some type of mechanism that checks to make sure that the component is downloaded and a connection to a Tor circuit has been established before allowing users to use the feature?

@diracdeltas
Copy link
Member

Agreed, we'll need some type of indicator that the binary is being actually being downloaded as some users on slower connections might think the feature is completely broken. Maybe having some type of mechanism that checks to make sure that the component is downloaded and a connection to a Tor circuit has been established before allowing users to use the feature?

muon had a feature where the urlbar would be unusable (and show percentage complete) until a tor circuit was established. we could just do that and show "downloading tor..." in the urlbar.

@diracdeltas diracdeltas added the priority/P3 The next thing for us to work on. It'll ride the trains. label Apr 29, 2020
@rebron rebron added priority/P2 A bad problem. We might uplift this to the next planned release. and removed priority/P3 The next thing for us to work on. It'll ride the trains. labels Jun 2, 2020
@jumde jumde self-assigned this Jun 23, 2020
@diracdeltas diracdeltas assigned darkdh and unassigned jumde Jun 25, 2020
@diracdeltas
Copy link
Member

re-assigning to @darkdh per discussion on slack

@rebron rebron removed their assignment Jul 14, 2020
@bridiver
Copy link
Contributor

Agreed, we'll need some type of indicator that the binary is being actually being downloaded as some users on slower connections might think the feature is completely broken. Maybe having some type of mechanism that checks to make sure that the component is downloaded and a connection to a Tor circuit has been established before allowing users to use the feature?

muon had a feature where the urlbar would be unusable (and show percentage complete) until a tor circuit was established. we could just do that and show "downloading tor..." in the urlbar.

@diracdeltas we don't need to do that here because we can defer any page loads with a navigation throttle. We do the same thing for Webtorrent.

@btlechowski
Copy link

btlechowski commented Aug 14, 2020

Verification passed on

Brave 1.13.71 Chromium: 84.0.4147.125 (Official Build) dev (64-bit)
Revision d0784639447f2e10d32ebaf9861092b20cfde286-refs/branch-heads/4147@{#1059}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-core#6081

New profile and relaunch
Verified there is no Tor Client Updater in brave://components on clean install
Verified Tor started to work eventually
Verified that after Tor window is opened Tor Client Updater is present in brave://components
Verified Tor binary was not deleted after restarting the browser
image
Verified that Tor works after browser restart

Emulate slow network
Verified the page was eventually loaded in Tor Window

Disable Tor by settings
Verified that after disabling Tor, biahpgbdmdkfgndcmfiipgcebobojjkp Tor extension folder was deleted
image
Verified re-enabling Tor, downloaded the binary and opened a page in Tor Window


Verification passed on


Brave | 1.13.73 Chromium: 84.0.4147.125 (Official Build) dev (64-bit)
-- | --
Revision | d0784639447f2e10d32ebaf9861092b20cfde286-refs/branch-heads/4147@{#1059}
OS | Windows 10 OS Version 1903 (Build 18362.1016)


New Profile and relaunch

  • Verified there is no Tor Client Updater in brave://components on a clean install
  • Verified TOR request pending with lazy load when https://check.torproject.org/ is opened in TOR tab initially
    image
  • Verified that TOR process is launched eventually, it will get https://check.torproject.org/ loaded successfully
  • Verified that "Tor Client Updater" shows up in brave://components
  • Verified Tor binary was not deleted after restarting the browser
    image
  • Verified that Tor works after browser restart

Emulate slow network
Verified the page was eventually loaded in Tor Window

Disable Tor by settings and Disable Tor by group policy (Windows)


Verified passed with

Brave	1.13.77 Chromium: 85.0.4183.69 (Official Build) dev (64-bit)
Revision	4554ea1a1171bd8d06951a4b7d9336afe6c59967-refs/branch-heads/4183@{#1426}
OS	macOS Version 10.14.6 (Build 18G3020)

New profile and relaunch - PASSED
Verified there is no Tor Client Updater in brave://components on clean install
clean install

Verified TOR request pending with lazy load when https://check.torproject.org/ is opened in TOR tab initially
new profile pending

Verified Tor started to work eventually
Verified that after Tor window is opened Tor Client Updater is present in brave://components
after using Tor

Verified Tor binary was not deleted after restarting the browser
Verified that Tor works after browser restart

Emulate Slow Network - PASSED
Confirmed after following steps in PR for this test, the page was eventually loaded in Tor Window.
Ran similar steps but instead of turning off the network, I ran my laptop thru my mobile hotspot. Confirmed page was eventually loaded in Tor Window.

Disable Tor by settings - PASSED
Confirmed that after disabling Tor in brave://settings/extensions, the cldoidikboihgcjfkhdeidbpclkineef Tor extension folder was deleted.
Confirmed if I re-enable the setting, I am able to open a Tor window and the Tor component is re-downloaded. Confirmed able to visit check.torproject.org as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment