lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

April 2024

  • 1 participants
  • 152 discussions
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Implement Android-native Connection Assist UI
by Dan Ballard (@dan) 17 Apr '24

17 Apr '24
Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android Commits: 1b8ed990 by clairehurst at 2024-04-17T16:37:37+00:00 fixup! Implement Android-native Connection Assist UI - - - - - 2 changed files: - fenix/app/src/main/java/org/mozilla/fenix/tor/TorConnectionAssistFragment.kt - fenix/app/src/main/res/layout/fragment_tor_connection_assist.xml Changes: ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/TorConnectionAssistFragment.kt ===================================== @@ -102,7 +102,6 @@ class TorConnectionAssistFragment : Fragment() { binding.torConnectImage.visibility = View.GONE binding.titleLargeTextView.visibility = View.GONE binding.titleDescription.visibility = View.GONE - binding.quickStartDescription.visibility = View.GONE binding.quickstartSwitch.visibility = View.GONE binding.torBootstrapButton1.visibility = View.GONE binding.torBootstrapButton2.visibility = View.GONE @@ -128,7 +127,6 @@ class TorConnectionAssistFragment : Fragment() { binding.titleDescription.visibility = View.VISIBLE binding.titleDescription.text = getString(R.string.preferences_tor_network_settings_explanation) - binding.quickStartDescription.visibility = View.VISIBLE binding.quickstartSwitch.visibility = View.VISIBLE binding.quickstartSwitch.isChecked = viewModel.quickstartToggle().value == true @@ -172,7 +170,6 @@ class TorConnectionAssistFragment : Fragment() { binding.quickstartSwitch.visibility = View.VISIBLE binding.quickstartSwitch.isChecked = viewModel.quickstartToggle().value == true binding.quickstartSwitch.jumpDrawablesToCurrentState() - binding.quickStartDescription.visibility = View.VISIBLE binding.torBootstrapButton1.visibility = View.INVISIBLE binding.torBootstrapButton2.visibility = View.VISIBLE binding.torBootstrapButton2.text = getString(R.string.btn_cancel) @@ -221,7 +218,6 @@ class TorConnectionAssistFragment : Fragment() { ) handleDescriptionWithClickable(internetErrorDescription, learnMore) - binding.quickStartDescription.visibility = View.GONE binding.quickstartSwitch.visibility = View.GONE binding.torBootstrapButton1.visibility = View.VISIBLE @@ -249,7 +245,6 @@ class TorConnectionAssistFragment : Fragment() { getString(R.string.connection_assist_trying_again_waiting_title) binding.quickstartSwitch.visibility = View.GONE - binding.quickStartDescription.visibility = View.GONE binding.torBootstrapButton1.visibility = View.INVISIBLE binding.torBootstrapButton2.visibility = View.VISIBLE binding.torBootstrapButton2.text = getString(R.string.btn_cancel) @@ -282,7 +277,6 @@ class TorConnectionAssistFragment : Fragment() { ) handleDescriptionWithClickable(tryABridge, learnMore) - binding.quickStartDescription.visibility = View.GONE binding.quickstartSwitch.visibility = View.GONE binding.unblockTheInternetInCountryDescription.visibility = View.VISIBLE binding.countryDropDown.visibility = View.VISIBLE ===================================== fenix/app/src/main/res/layout/fragment_tor_connection_assist.xml ===================================== @@ -70,85 +70,52 @@ android:visibility="visible" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/tor_bootstrap_progress_bar" - app:layout_constraintVertical_bias="0.075" + app:layout_constraintTop_toBottomOf="@+id/back_button" + app:layout_constraintVertical_bias="0.05" app:srcCompat="@drawable/connect" /> <TextView android:id="@+id/title_large_text_view" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="24dp" - android:layout_marginEnd="24dp" + android:layout_marginTop="24dp" + android:paddingHorizontal="24dp" android:text="@string/connection_assist_tor_connect_title" android:textColor="#FBFBFE" android:textSize="22sp" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/tor_connect_image" - app:layout_constraintVertical_bias="0.03" /> + app:layout_constraintTop_toBottomOf="@id/tor_connect_image" /> <TextView android:id="@+id/title_description" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="24dp" - android:layout_marginEnd="24dp" android:lineSpacingExtra="6dp" + android:paddingHorizontal="24dp" + android:paddingVertical="16dp" android:text="@string/preferences_tor_network_settings_explanation" android:textColor="#FBFBFE" android:textSize="14sp" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintHorizontal_bias="0.0" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/title_large_text_view" - app:layout_constraintVertical_bias="0.03" /> - - - <TextView - android:id="@+id/quick_start_description" - android:layout_width="230dp" - android:layout_height="wrap_content" - android:layout_marginStart="24dp" - android:text="@string/connection_assist_always_connect_automatically_toggle_description" - android:textColor="#FBFBFE" - android:textSize="14sp" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/title_description" - app:layout_constraintVertical_bias=".03" /> + app:layout_constraintTop_toBottomOf="@id/title_large_text_view" /> <androidx.appcompat.widget.SwitchCompat android:id="@+id/quickstart_switch" - android:layout_width="wrap_content" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="100dp" - android:layout_marginEnd="24dp" - android:layout_marginBottom="24dp" - android:gravity="center" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintHorizontal_bias="0" - app:layout_constraintStart_toEndOf="@+id/quick_start_description" - app:layout_constraintTop_toBottomOf="@id/title_description" - app:layout_constraintVertical_bias=".023" - app:layout_goneMarginEnd="6dp" - app:layout_goneMarginTop="9dp" /> + android:paddingHorizontal="24dp" + android:paddingVertical="8dp" + android:text="@string/connection_assist_always_connect_automatically_toggle_description" + android:textColor="#FBFBFE" + app:layout_constraintTop_toBottomOf="@id/title_description" /> <TextView android:id="@+id/unblock_the_internet_in_country_description" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="24dp" + android:paddingHorizontal="24dp" android:layout_marginTop="24dp" - android:layout_marginEnd="24dp" android:text="@string/connection_assist_unblock_the_internet_in_country_or_region" android:textColor="#FBFBFE" - android:visibility="invisible" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" + android:visibility="gone" app:layout_constraintTop_toBottomOf="@id/title_description" /> <androidx.appcompat.widget.AppCompatSpinner @@ -161,7 +128,7 @@ android:layout_marginEnd="24dp" android:textColor="#FBFBFE" android:tooltipText="@string/connection_assist_share_my_location_country_or_region" - android:visibility="invisible" + android:visibility="gone" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/unblock_the_internet_in_country_description" /> @@ -170,13 +137,14 @@ android:id="@+id/wordmarkLogo" android:layout_width="160dp" android:layout_height="160dp" + android:contentDescription="" android:src="@mipmap/ic_launcher_round" + android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - android:contentDescription="" /> + app:layout_constraintTop_toTopOf="parent" /> <Button android:id="@+id/tor_bootstrap_button_1" @@ -195,9 +163,7 @@ android:textStyle="bold" app:layout_constraintBottom_toTopOf="@id/tor_bootstrap_button_2" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/quickstart_switch" - app:layout_constraintVertical_bias="1" /> + app:layout_constraintStart_toStartOf="parent" /> <Button android:id="@+id/tor_bootstrap_button_2" View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/1b8… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/1b8… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.10.0esr-13.5-1] Bug 42528: Don't leak system scrollbar size on windows.
by Pier Angelo Vendrame (@pierov) 17 Apr '24

17 Apr '24
Pier Angelo Vendrame pushed to branch mullvad-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser Commits: 1908311e by Henry Wilkes at 2024-04-17T18:10:56+02:00 Bug 42528: Don&#39;t leak system scrollbar size on windows. - - - - - 2 changed files: - widget/ScrollbarDrawingWin.cpp - widget/ScrollbarDrawingWin11.cpp Changes: ===================================== widget/ScrollbarDrawingWin.cpp ===================================== @@ -11,6 +11,7 @@ #include "nsLayoutUtils.h" #include "Theme.h" #include "nsNativeTheme.h" +#include "nsContentUtils.h" namespace mozilla::widget { @@ -164,7 +165,10 @@ void ScrollbarDrawingWin::RecomputeScrollbarParams() { } ConfigureScrollbarSize(defaultSize); - if (StaticPrefs::widget_non_native_theme_win_scrollbar_use_system_size()) { + // Do not leak system size when using ResistFingerprinting. + if (!nsContentUtils::ShouldResistFingerprinting("No context available", + RFPTarget::Unknown) && + StaticPrefs::widget_non_native_theme_win_scrollbar_use_system_size()) { ConfigureScrollbarSize(LookAndFeel::GetInt( LookAndFeel::IntID::SystemScrollbarSize, defaultSize)); } ===================================== widget/ScrollbarDrawingWin11.cpp ===================================== @@ -11,6 +11,7 @@ #include "nsLayoutUtils.h" #include "Theme.h" #include "nsNativeTheme.h" +#include "nsContentUtils.h" using mozilla::gfx::sRGBColor; @@ -352,6 +353,11 @@ bool ScrollbarDrawingWin11::PaintScrollbarThumb( void ScrollbarDrawingWin11::RecomputeScrollbarParams() { ScrollbarDrawingWin::RecomputeScrollbarParams(); + if (nsContentUtils::ShouldResistFingerprinting("No context available", + RFPTarget::Unknown)) { + // Do not distinguish sizes between windows 10 and 11. + return; + } // TODO(emilio): Maybe make this configurable? Though this doesn't respect // classic Windows registry settings, and cocoa overlay scrollbars also don't // respect the override it seems, so this should be fine. View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/190… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/190… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-115.10.0esr-13.5-1] Bug 42528: Don't leak system scrollbar size on windows.
by Pier Angelo Vendrame (@pierov) 17 Apr '24

17 Apr '24
Pier Angelo Vendrame pushed to branch base-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 39b29d69 by Henry Wilkes at 2024-04-17T18:10:24+02:00 Bug 42528: Don&#39;t leak system scrollbar size on windows. - - - - - 2 changed files: - widget/ScrollbarDrawingWin.cpp - widget/ScrollbarDrawingWin11.cpp Changes: ===================================== widget/ScrollbarDrawingWin.cpp ===================================== @@ -11,6 +11,7 @@ #include "nsLayoutUtils.h" #include "Theme.h" #include "nsNativeTheme.h" +#include "nsContentUtils.h" namespace mozilla::widget { @@ -164,7 +165,10 @@ void ScrollbarDrawingWin::RecomputeScrollbarParams() { } ConfigureScrollbarSize(defaultSize); - if (StaticPrefs::widget_non_native_theme_win_scrollbar_use_system_size()) { + // Do not leak system size when using ResistFingerprinting. + if (!nsContentUtils::ShouldResistFingerprinting("No context available", + RFPTarget::Unknown) && + StaticPrefs::widget_non_native_theme_win_scrollbar_use_system_size()) { ConfigureScrollbarSize(LookAndFeel::GetInt( LookAndFeel::IntID::SystemScrollbarSize, defaultSize)); } ===================================== widget/ScrollbarDrawingWin11.cpp ===================================== @@ -11,6 +11,7 @@ #include "nsLayoutUtils.h" #include "Theme.h" #include "nsNativeTheme.h" +#include "nsContentUtils.h" using mozilla::gfx::sRGBColor; @@ -352,6 +353,11 @@ bool ScrollbarDrawingWin11::PaintScrollbarThumb( void ScrollbarDrawingWin11::RecomputeScrollbarParams() { ScrollbarDrawingWin::RecomputeScrollbarParams(); + if (nsContentUtils::ShouldResistFingerprinting("No context available", + RFPTarget::Unknown)) { + // Do not distinguish sizes between windows 10 and 11. + return; + } // TODO(emilio): Maybe make this configurable? Though this doesn't respect // classic Windows registry settings, and cocoa overlay scrollbars also don't // respect the override it seems, so this should be fine. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/39b29d6… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/39b29d6… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.10.0esr-13.5-1] Bug 42528: Don't leak system scrollbar size on windows.
by Pier Angelo Vendrame (@pierov) 17 Apr '24

17 Apr '24
Pier Angelo Vendrame pushed to branch tor-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 9b68a413 by Henry Wilkes at 2024-04-17T16:09:08+00:00 Bug 42528: Don&#39;t leak system scrollbar size on windows. - - - - - 2 changed files: - widget/ScrollbarDrawingWin.cpp - widget/ScrollbarDrawingWin11.cpp Changes: ===================================== widget/ScrollbarDrawingWin.cpp ===================================== @@ -11,6 +11,7 @@ #include "nsLayoutUtils.h" #include "Theme.h" #include "nsNativeTheme.h" +#include "nsContentUtils.h" namespace mozilla::widget { @@ -164,7 +165,10 @@ void ScrollbarDrawingWin::RecomputeScrollbarParams() { } ConfigureScrollbarSize(defaultSize); - if (StaticPrefs::widget_non_native_theme_win_scrollbar_use_system_size()) { + // Do not leak system size when using ResistFingerprinting. + if (!nsContentUtils::ShouldResistFingerprinting("No context available", + RFPTarget::Unknown) && + StaticPrefs::widget_non_native_theme_win_scrollbar_use_system_size()) { ConfigureScrollbarSize(LookAndFeel::GetInt( LookAndFeel::IntID::SystemScrollbarSize, defaultSize)); } ===================================== widget/ScrollbarDrawingWin11.cpp ===================================== @@ -11,6 +11,7 @@ #include "nsLayoutUtils.h" #include "Theme.h" #include "nsNativeTheme.h" +#include "nsContentUtils.h" using mozilla::gfx::sRGBColor; @@ -352,6 +353,11 @@ bool ScrollbarDrawingWin11::PaintScrollbarThumb( void ScrollbarDrawingWin11::RecomputeScrollbarParams() { ScrollbarDrawingWin::RecomputeScrollbarParams(); + if (nsContentUtils::ShouldResistFingerprinting("No context available", + RFPTarget::Unknown)) { + // Do not distinguish sizes between windows 10 and 11. + return; + } // TODO(emilio): Maybe make this configurable? Though this doesn't respect // classic Windows registry settings, and cocoa overlay scrollbars also don't // respect the override it seems, so this should be fine. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/9b68a41… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/9b68a41… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-115.10.0esr-13.5-1] Bug 41966: Allow removing locales from the locale alternatives list.
by Pier Angelo Vendrame (@pierov) 17 Apr '24

17 Apr '24
Pier Angelo Vendrame pushed to branch base-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 168e038e by Henry Wilkes at 2024-04-17T16:52:24+02:00 Bug 41966: Allow removing locales from the locale alternatives list. - - - - - 1 changed file: - browser/components/preferences/dialogs/browserLanguages.js Changes: ===================================== browser/components/preferences/dialogs/browserLanguages.js ===================================== @@ -349,7 +349,7 @@ async function getLocaleDisplayInfo(localeCodes) { id: "locale-" + code, label: localeNames[i], value: code, - canRemove: !packagedLocales.has(code), + canRemove: code !== Services.locale.defaultLocale, installed: availableLocales.has(code), }; }); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/168e038… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/168e038… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-115.10.0esr-13.5-1] Bug 41966: Allow removing locales from the locale alternatives list.
by Pier Angelo Vendrame (@pierov) 17 Apr '24

17 Apr '24
Pier Angelo Vendrame pushed to branch mullvad-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser Commits: 2970b5b4 by Henry Wilkes at 2024-04-17T16:52:44+02:00 Bug 41966: Allow removing locales from the locale alternatives list. - - - - - 1 changed file: - browser/components/preferences/dialogs/browserLanguages.js Changes: ===================================== browser/components/preferences/dialogs/browserLanguages.js ===================================== @@ -349,7 +349,7 @@ async function getLocaleDisplayInfo(localeCodes) { id: "locale-" + code, label: localeNames[i], value: code, - canRemove: !packagedLocales.has(code), + canRemove: code !== Services.locale.defaultLocale, installed: availableLocales.has(code), }; }); View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/297… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/297… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.10.0esr-13.5-1] Bug 41966: Allow removing locales from the locale alternatives list.
by Pier Angelo Vendrame (@pierov) 17 Apr '24

17 Apr '24
Pier Angelo Vendrame pushed to branch tor-browser-115.10.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 5be723a9 by Henry Wilkes at 2024-04-17T15:37:09+01:00 Bug 41966: Allow removing locales from the locale alternatives list. - - - - - 1 changed file: - browser/components/preferences/dialogs/browserLanguages.js Changes: ===================================== browser/components/preferences/dialogs/browserLanguages.js ===================================== @@ -349,7 +349,7 @@ async function getLocaleDisplayInfo(localeCodes) { id: "locale-" + code, label: localeNames[i], value: code, - canRemove: !packagedLocales.has(code), + canRemove: code !== Services.locale.defaultLocale, installed: availableLocales.has(code), }; }); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5be723a… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5be723a… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][maint-13.0] Bug 41128: Fix spaces in various config files.
by Pier Angelo Vendrame (@pierov) 17 Apr '24

17 Apr '24
Pier Angelo Vendrame pushed to branch maint-13.0 at The Tor Project / Applications / tor-browser-build Commits: 24cb8294 by Pier Angelo Vendrame at 2024-04-17T14:41:09+02:00 Bug 41128: Fix spaces in various config files. Some files contain more spaces than needed. After fixing them, we can update these files with ruamel.yaml if needed. - - - - - 30 changed files: - projects/glean/config - projects/goansicolor/config - projects/gobtcd/config - projects/gobtclog/config - projects/gobtcutil/config - projects/gobuildinfo/config - projects/goconfigurable/config - projects/godegoutils/config - projects/godexlogconfig/config - projects/godns/config - projects/goeasyconfig/config - projects/gogroupcache/config - projects/goisatty/config - projects/gokingpin/config - projects/gomadns/config - projects/goncbtcjson/config - projects/goncrpcclient/config - projects/gopflag/config - projects/gopretty/config - projects/goservice/config - projects/gosocks/config - projects/gosvcutils/config - projects/gosystemd/config - projects/gotemplate/config - projects/gotext/config - projects/gotoml/config - projects/gounits/config - projects/gowebsocket/config - projects/goxlog/config - projects/gspt/config The diff was not included because it is too large. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/2… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/2… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][main] Bug 41128: Fix spaces in various config files.
by Pier Angelo Vendrame (@pierov) 17 Apr '24

17 Apr '24
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: f8cb6710 by Pier Angelo Vendrame at 2024-04-17T11:26:53+02:00 Bug 41128: Fix spaces in various config files. Some files contain more spaces than needed. After fixing them, we can update these files with ruamel.yaml if needed. - - - - - 30 changed files: - projects/glean/config - projects/goansicolor/config - projects/gobtcd/config - projects/gobtclog/config - projects/gobtcutil/config - projects/gobuildinfo/config - projects/goconfigurable/config - projects/godegoutils/config - projects/godexlogconfig/config - projects/godns/config - projects/goeasyconfig/config - projects/gogroupcache/config - projects/goisatty/config - projects/gokingpin/config - projects/gomadns/config - projects/goncbtcjson/config - projects/goncrpcclient/config - projects/gopflag/config - projects/gopretty/config - projects/goservice/config - projects/gosocks/config - projects/gosvcutils/config - projects/gosystemd/config - projects/gotemplate/config - projects/gotext/config - projects/gotoml/config - projects/gounits/config - projects/gowebsocket/config - projects/goxlog/config - projects/gspt/config The diff was not included because it is too large. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/f… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/f… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Add Tor integration and UI
by Dan Ballard (@dan) 17 Apr '24

17 Apr '24
Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android Commits: 2095a229 by clairehurst at 2024-04-17T00:27:30+00:00 fixup! Add Tor integration and UI - - - - - 4 changed files: - + fenix/app/src/main/java/org/mozilla/fenix/tor/TorLogsComposeFragment.kt - − fenix/app/src/main/java/org/mozilla/fenix/tor/TorLogsFragment.kt - + fenix/app/src/main/java/org/mozilla/fenix/tor/TorLogsViewModel.kt - fenix/app/src/main/res/navigation/nav_graph.xml Changes: ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/TorLogsComposeFragment.kt ===================================== @@ -0,0 +1,82 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.fenix.tor + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.text.selection.DisableSelection +import androidx.compose.foundation.text.selection.SelectionContainer +import androidx.compose.foundation.verticalScroll +import androidx.compose.material.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.Stable +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.ComposeView +import androidx.compose.ui.unit.dp +import androidx.fragment.app.Fragment +import androidx.fragment.app.viewModels +import mozilla.components.ui.colors.PhotonColors + +class TorLogsComposeFragment : Fragment() { + private val viewModel: TorLogsViewModel by viewModels() + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle?, + ): View { + return ComposeView(requireContext()).apply { + setContent { + SelectionContainer { + Column( + // Column instead of LazyColumn so that you can select all the logs, and not just one "screen" at a time + // The logs won't be too big so loading them all instead of just whats visible shouldn't be a big deal + modifier = Modifier + .fillMaxSize() + .verticalScroll(state = rememberScrollState(), reverseScrolling = true), + ) { + for (log in viewModel.torLogs) { + LogRow(log = log) + } + } + } + } + } + } +} + +@Composable +@Stable +fun LogRow(log: TorLog, modifier: Modifier = Modifier) { + Column( + modifier + .fillMaxWidth() + .padding( + start = 16.dp, + end = 16.dp, + bottom = 16.dp, + ), + ) { + DisableSelection { + Text( + text = log.timestamp.toString(), + color = PhotonColors.LightGrey40, + modifier = modifier + .padding(bottom = 4.dp), + ) + } + Text( + text = log.text, + color = PhotonColors.LightGrey05, + ) + } +} ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/TorLogsFragment.kt deleted ===================================== @@ -1,81 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.fenix.tor - -import android.os.Bundle -import android.text.method.ScrollingMovementMethod -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import androidx.fragment.app.Fragment -import org.mozilla.fenix.R -import org.mozilla.fenix.components.Components -import org.mozilla.fenix.databinding.TorBootstrapLoggerBinding -import org.mozilla.fenix.ext.requireComponents -import org.mozilla.fenix.tor.view.TorBootstrapLoggerViewHolder - -class TorLogsFragment : Fragment(), TorLogs { - - private var entries = mutableListOf<String>() - internal var _binding: TorBootstrapLoggerBinding? = null - private val binding get() = _binding!! - - private var _components: Components? = null - private val components get() = _components!! - - override fun onCreateView( - inflater: LayoutInflater, - container: ViewGroup?, - savedInstanceState: Bundle?, - ): View { - _binding = TorBootstrapLoggerBinding.inflate(inflater) - _components = requireComponents - - components.torController.registerTorLogListener(this) - - val currentEntries = components.torController.logEntries.filter { it.second != null } - .filter { !(it.second!!.startsWith("Circuit") && it.first == "ON") } - // Keep synchronized with format in onTorStatusUpdate - .flatMap { listOf("(${it.first}) '${it.second}'") } - val entriesLen = currentEntries.size - val subListOffset = - if (entriesLen > TorBootstrapLoggerViewHolder.MAX_NEW_ENTRIES) TorBootstrapLoggerViewHolder.MAX_NEW_ENTRIES else entriesLen - entries = - currentEntries.subList((entriesLen - subListOffset), entriesLen) as MutableList<String> - val initLog = - "---------------" + getString(R.string.tor_initializing_log) + "---------------" - entries.add(0, initLog) - - with(binding.torBootstrapLogEntries) { - movementMethod = ScrollingMovementMethod() - text = formatLogEntries(entries) - } - - - return binding.root - } - - // TODO on destroy unregiuster - - private fun formatLogEntries(entries: List<String>) = entries.joinToString("\n") - - override fun onLog(type: String?, message: String?) { - if (message == null || type == null) return - if (type == "ON" && type.startsWith("Circuit")) return - - if (entries.size > TorBootstrapLoggerViewHolder.MAX_LINES) { - entries = entries.drop(1) as MutableList<String> - } - entries.add("($type) '$message'") - - binding.torBootstrapLogEntries.text = formatLogEntries(entries) - } - - override fun onStop() { - super.onStop() - components.torController.unregisterTorLogListener(this) - } - -} ===================================== fenix/app/src/main/java/org/mozilla/fenix/tor/TorLogsViewModel.kt ===================================== @@ -0,0 +1,88 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.fenix.tor + +import android.app.Application +import android.content.ClipData +import android.content.ClipboardManager +import android.content.Context +import android.os.Build +import android.widget.Toast +import androidx.compose.runtime.Stable +import androidx.lifecycle.AndroidViewModel +import org.mozilla.fenix.R +import org.mozilla.fenix.ext.components +import java.sql.Timestamp + +class TorLogsViewModel(application: Application) : AndroidViewModel(application), TorLogs { + private val torController = application.components.torController + private val clipboardManager = + application.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager + + val torLogs: MutableList<TorLog> = mutableListOf( + TorLog( + "---------------" + application.getString(R.string.tor_initializing_log) + "---------------", + ), + ) + + init { + setupClipboardListener() + torController.registerTorLogListener(this) + val currentEntries = torController.logEntries.filter { it.second != null } + .filter { !(it.second!!.startsWith("Circuit") && it.first == "ON") } + // Keep synchronized with format in onTorStatusUpdate + .flatMap { listOf(TorLog("[${it.first}] ${it.second}")) } + torLogs.addAll(currentEntries) + } + + override fun onLog(type: String?, message: String?) { + if (message == null || type == null) return + if (type == "ON" && type.startsWith("Circuit")) return + + torLogs.add(TorLog("[$type] $message")) + } + + override fun onCleared() { + super.onCleared() + torController.unregisterTorLogListener(this) + } + + private fun setupClipboardListener() { + clipboardManager.addPrimaryClipChangedListener { + // Only show a toast for Android 12 and lower. + // https://developer.android.com/develop/ui/views/touch-and-input/copy-paste#d… + if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2) { + Toast.makeText( + getApplication<Application>().applicationContext, + getApplication<Application>().getString(R.string.toast_copy_link_to_clipboard), // "Copied to clipboard" already translated + Toast.LENGTH_SHORT, + ).show() + } + } + } + + fun copyAllLogsToClipboard() { // TODO add kebab menu in top right corner which includes option to "Copy all logs" + clipboardManager.setPrimaryClip( + ClipData.newPlainText( + "Copied Text", + getAllTorLogs(), + ), + ) + } + + private fun getAllTorLogs(): String { + var ret = "" + for (log in torLogs) { + ret += log.text + '\n' + } + return ret + } +} + +@Stable +data class TorLog( + val text: String, + val timestamp: Timestamp = Timestamp(System.currentTimeMillis()), +) ===================================== fenix/app/src/main/res/navigation/nav_graph.xml ===================================== @@ -976,8 +976,7 @@ <fragment android:id="@+id/torBridgeConfigFragment" android:name="org.mozilla.fenix.settings.TorBridgeConfigFragment" - android:label="@string/preferences_tor_network_settings_bridge_config" - tools:layout="@layout/fragment_tor_bridge_config" /> + android:label="@string/preferences_tor_network_settings_bridge_config" /> <fragment android:id="@+id/torBetaConnectionFeaturesFragment" android:name="org.mozilla.fenix.tor.TorBetaConnectionFeaturesFragment" @@ -985,9 +984,8 @@ tools:layout="@layout/tor_network_settings_beta_connection_features" /> <fragment android:id="@+id/torLogsFragment" - android:name="org.mozilla.fenix.tor.TorLogsFragment" - android:label="Tor Logs" - tools:layout="@layout/tor_bootstrap_logger" /> + android:name="org.mozilla.fenix.tor.TorLogsComposeFragment" + android:label="@string/preferences_tor_logs" /> <fragment android:id="@+id/trackingProtectionFragment" View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/209… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/209… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • ...
  • 16
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.