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

Create tor profile without dummy regular profile #12429

Closed
darkdh opened this issue Oct 30, 2020 · 1 comment · Fixed by brave/brave-core#7069
Closed

Create tor profile without dummy regular profile #12429

darkdh opened this issue Oct 30, 2020 · 1 comment · Fixed by brave/brave-core#7069

Comments

@darkdh
Copy link
Member

darkdh commented Oct 30, 2020

With these new interfaces

  // Return an OffTheRecord version of this profile with the given
  // |otr_profile_id|. The returned pointer is owned by the receiving profile.
  // If the receiving profile is OffTheRecord, the owner would be its original
  // profile.
  //
  // WARNING I: This will create the OffTheRecord profile if it doesn't already
  // exist. If this isn't what you want, you need to check
  // HasOffTheRecordProfile() first.
  //
  // WARNING II: Once a profile is no longer used, use
  // ProfileDestroyer::DestroyProfileWhenAppropriate or
  // ProfileDestroyer::DestroyOffTheRecordProfileNow to destroy it.
  virtual Profile* GetOffTheRecordProfile(
      const OTRProfileID& otr_profile_id) = 0;
  // Returns all OffTheRecord profiles.
  virtual std::vector<Profile*> GetAllOffTheRecordProfiles() = 0;
  // Returns the primary OffTheRecord profile. Creates the profile if it doesn't
  // exist.
  Profile* GetPrimaryOTRProfile();

We can create a Tor OTR profile associated with current used regular profile with custom OTRProfileID

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Dec 22, 2020

Verification passed on


Brave | 1.19.66 Chromium: 87.0.4280.101 (Official Build) dev (64-bit)
-- | --
Revision | 9407c80213cda69c2b7abcb4fa8e3f74488f4956-refs/branch-heads/4280@{#1807}
OS | Windows 10 OS Version 2004 (Build 19041.685)


Verification passed on

Brave 1.19.73 Chromium: 87.0.4280.101 (Official Build) dev (64-bit)
Revision 9407c80213cda69c2b7abcb4fa8e3f74488f4956-refs/branch-heads/4280@{#1807}
OS Ubuntu 18.04 LTS
Multiple TOR profiles

profile1
image

profile2
image

image

Tor profile migration
  • Installed 1.17.x build and opened TOR window from both default and new profile and quit the browser, upgraded the profile to new brave 1.19.x and ensured that the https://check.torproject.org/ is opened and which is connected to TOR n/w in TOR windows in both profiles ( default and profile 1)

Before upgrade:
image
After upgrade
image

Tor Window act like Private Window with Tor connectivity
  • Ensured bookmarks Add/Remove/Modified in a TOR window synced with regular profile
  • Ensured shield setting inherited from regular profile when Tor window opened, changes made in TOR window will not reflect in regular profile
  • Ensured preference like "Show home button" is synced with regular profile
Non component extensions blocked
  • Install an extension and turn on Allow in private in brave://extensions/ and opened a Tor window and ensured extension is not accessible in TOR window but shield(component extension) are still working
  • Opened 1 Private window and ensured that the installed extension is accessible
Different circuit for different tor profiles
  • Opened two profiles default and profile 1, and navigated to https://check.torproject.org/ in TOR windows in both profiles and ensured that different IP address is listed in both profiles

image

  • Clicked on "New Tor connections for this site" on both Tor windows and ensured that different IP address is listed in both profiles
Tor process cleanup
  • Verified that Tor Launcher process is listed in the task manager when one/multiple TOR window is opened
    image

  • Verified that the Tor Launcher process isn't listed in the task manager when TOR window isn't opened
    image


Verified passed with

Brave	1.19.78 Chromium: 87.0.4280.101 (Official Build) dev (x86_64)
Revision	9407c80213cda69c2b7abcb4fa8e3f74488f4956-refs/branch-heads/4280@{#1807}
OS	macOS Version 10.15.7 (Build 19H15)

Verified test plans from brave/brave-core#7069

Multiple profiles issues

See testing notes under:

Tor profile migration

Installed 1.18.77 and had 2 profiles set up: Default and Profile 1.
Opened a Tor window for each (not at the same time) and navigated to check.torproject.org.
Closed 1.18.77.
Confirmed ~/Library/Application Support/BraveSoftware/Brave-Browser/Default/session_profiles/Tor Profile and ~/Library/Application Support/BraveSoftware/Brave-Browser/Profile 1/session_profiles/Tor Profile exist.
Renamed profile to dev channel and launched with 1.19.x.
Opened a Tor window for both Default and Profile 1 profiles and navigated to check.torproject.org.
Closed 1.19.x.
Confirmed ~/Library/Application Support/BraveSoftware/Brave-Browser/Default/session_profiles/Tor Profile and ~/Library/Application Support/BraveSoftware/Brave-Browser/Profile 1/session_profiles/Tor Profile are removed.

Tor Window should act like Private Window with Tor connectivity

Ensured bookmarks Add/Remove/Modified in a TOR window synced with regular profile
Ensured shield setting inherited from regular profile when Tor window opened, changes made in TOR window will not reflect in regular profile
Ensured preference like "Show home button" is synced with regular profile

Non component extensions blocked

Installed Honey and allowed in Private:
Screen Shot 2021-01-07 at 4 52 36 PM

Confirmed Honey is accessible/visible on Private window:
Private

Confirmed Honey is not accessible/visible on Tor window:
Tor

Confirmed shields work on Tor window without issue. Able to modify shield settings per site.

Different circuit for different tor profiles

First set of circuits:

Screen Shot 2021-01-07 at 5 05 07 PM

Second set of circuits after selecting new Tor connection on both Tor windows:

Screen Shot 2021-01-07 at 5 05 24 PM
Tor process cleanup

Confirmed "Tor Launcher" process shown when Tor windows are opened for two different profiles:

Screen Shot 2021-01-07 at 5 14 17 PM

Confirmed "Tor Launcher" process still shown after one of the Tor windows above is closed:

Screen Shot 2021-01-07 at 5 14 37 PM

Confirmed "Tor Launcher" process is gone after all Tor windows closed:

Screen Shot 2021-01-07 at 5 14 57 PM

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