Commit a0901b99 authored by Richard Pospesel's avatar Richard Pospesel Committed by Dan Ballard
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 77c3fd1d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1798,6 +1798,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
@@ -79,6 +79,7 @@ DIRS += [
    "urlbar",
    "webrtc",
    "torcircuit",
    "torpreferences",
]

DIRS += ["build"]
+2 −1
Original line number Diff line number Diff line
@@ -526,12 +526,13 @@
<hbox id="networkProxyCategory"
      class="subcategory"
      hidden="true"
      data-hidden-from-search="true"
      data-category="paneGeneral">
  <html:h1 data-l10n-id="network-settings-title"/>
</hbox>

<!-- Network Settings-->
<groupbox id="connectionGroup" data-category="paneGeneral" hidden="true">
<groupbox id="connectionGroup" data-category="paneGeneral" data-hidden-from-search="true" hidden="true">
  <label class="search-header" hidden="true"><html:h2 data-l10n-id="network-settings-title"/></label>
  <description flex="1" control="connectionSettings" data-subcategory="netsettings"
    class="section-description">
+9 −0
Original line number Diff line number Diff line
@@ -14,6 +14,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" */
@@ -376,6 +377,14 @@ 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();
  }

  gSearchResultsPane.init();
  gMainPane.preInit();

+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"/>
@@ -105,6 +106,7 @@
  <script type="module" src="chrome://global/content/elements/moz-input-color.mjs"></script>
  <script type="module" src="chrome://browser/content/preferences/widgets/sync-device-name.mjs"></script>
  <script type="module" src="chrome://browser/content/preferences/widgets/sync-engines-list.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"
@@ -223,6 +225,8 @@
                      class="category hidden-category"
                      value="paneTranslations"/>

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

      </richlistbox>

      <spacer flex="1"/>
@@ -273,6 +277,7 @@
#include sync.inc.xhtml
#include experimental.inc.xhtml
#include moreFromMozilla.inc.xhtml
#include ../torpreferences/content/connectionPane.inc.xhtml
        </vbox>
      </vbox>
    </vbox>
Loading