Commit b5834c26 authored by Richard Pospesel's avatar Richard Pospesel Committed by Pier Angelo Vendrame
Browse files

TB 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection

This patch adds a new about:preferences#connection page which allows
modifying bridge, proxy, and firewall settings from within Tor Browser.
All of the functionality present in tor-launcher's Network
Configuration panel is present:

 - Setting built-in bridges
 - Requesting bridges from BridgeDB via moat
 - Using user-provided bridges
 - Configuring SOCKS4, SOCKS5, and HTTP/HTTPS proxies
 - Setting firewall ports
 - Viewing and Copying Tor's logs
 - The Networking Settings in General preferences has been removed

Bug 40774: Update about:preferences page to match new UI designs
parent 3d7aa53e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1806,6 +1806,8 @@ xpcom/idl-parser/xpidl/fixtures/xpctest.d.json

browser/app/profile/001-base-profile.js
browser/app/profile/000-tor-browser.js
# We do not use the preprocessor here, so we can lint it.
!browser/components/torpreferences/content/connectionPane.inc.xhtml
mobile/android/app/000-tor-browser-android.js
toolkit/content/pt_config.json
toolkit/content/moat_countries_dev_build.json
+1 −0
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@ DIRS += [
    "urlbar",
    "webrtc",
    "torcircuit",
    "torpreferences",
]

DIRS += ["build"]
+1 −1
Original line number Diff line number Diff line
@@ -209,5 +209,5 @@
<html:setting-group groupid="motionAndLink" data-category="paneGeneral" hidden="true" data-srd-migrated="" />

<!-- Network Settings-->
<html:setting-group groupid="networkProxy" data-category="paneGeneral" data-subcategory="netsettings" hidden="true" data-srd-migrated="" />
<html:setting-group groupid="networkProxy" data-category="paneGeneral" data-subcategory="netsettings" hidden="true" data-hidden-from-search="true" data-srd-migrated="" />
</html:template>
+8 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
/* import-globals-from findInPage.js */
/* import-globals-from /browser/base/content/utilityOverlay.js */
/* import-globals-from /toolkit/content/preferencesBindings.js */
/* import-globals-from ../torpreferences/content/connectionPane.js */

/** @import MozButton from "chrome://global/content/elements/moz-button.mjs" */
/** @import {SettingConfig, SettingEmitChange} from "chrome://global/content/preferences/Setting.mjs" */
@@ -546,6 +547,13 @@ function init_all() {
    register_module("paneSync", gSyncPane);
  }
  register_module("paneSearchResults", gSearchResultsPane);
  if (gConnectionPane.enabled) {
    document.getElementById("category-connection").hidden = false;
    register_module("paneConnection", gConnectionPane);
  } else {
    // Remove the pane from the DOM so it doesn't get incorrectly included in search results.
    document.getElementById("template-paneConnection").remove();
  }
  for (let [id, config] of Object.entries(CONFIG_PANES)) {
    // Skip over configs we do not want, including all its children.
    // See tor-browser#44711.
+5 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
  />

  <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelPreferences.css" />
  <link rel="stylesheet" href="chrome://browser/content/torpreferences/torPreferences.css" />

  <link rel="localization" href="branding/brand.ftl"/>
  <link rel="localization" href="browser/browser.ftl"/>
@@ -109,6 +110,7 @@
  <script type="module" src="chrome://browser/content/preferences/widgets/update-information.mjs"></script>
  <script type="module" src="chrome://browser/content/preferences/widgets/update-state.mjs"></script>
  <script type="module" src="chrome://browser/content/ipprotection/bandwidth-usage.mjs"></script>
  <script src="chrome://browser/content/torpreferences/bridgemoji/BridgeEmoji.js"/>
</head>

<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
@@ -230,6 +232,8 @@
      <!-- Hide the translations sub-pane. tor-browser#44710. -->
      <html:moz-page-nav-button hidden="true" class="hidden-category" view="paneTranslations"/>

#include ../torpreferences/content/connectionCategory.inc.xhtml

      <!-- Footer links -->
      <html:moz-page-nav-button id="addonsButton"
        slot="secondary-nav"
@@ -275,6 +279,7 @@
#include containers.inc.xhtml
#include sync.inc.xhtml
#include moreFromMozilla.inc.xhtml
#include ../torpreferences/content/connectionPane.inc.xhtml
        </vbox>
      </vbox>
    </vbox>
Loading