Verified Commit 173fcc62 authored by Richard Pospesel's avatar Richard Pospesel Committed by jwilde
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 f620957d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1809,6 +1809,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"]
+1 −1
Original line number Diff line number Diff line
@@ -382,5 +382,5 @@
<html:setting-group groupid="browsing" data-category="paneGeneral" hidden="true"/>

<!-- Network Settings-->
<html:setting-group groupid="networkProxy" data-category="paneGeneral" data-subcategory="netsettings" hidden="true" />
<html:setting-group groupid="networkProxy" data-category="paneGeneral" data-subcategory="netsettings" hidden="true" data-hidden-from-search="true" />
</html:template>
+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" */
@@ -391,6 +392,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"/>
@@ -106,6 +107,7 @@
  <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 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 @@
                      class="category hidden-category"
                      value="paneTranslations"/>

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

      </richlistbox>

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