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

Bug 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 d3ed4667
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ DIRS += [
    "uitour",
    "urlbar",
    "torcircuit",
    "torpreferences",
]

DIRS += ["build"]
+0 −48
Original line number Diff line number Diff line
@@ -789,52 +789,4 @@
    />
  </hbox>
</groupbox>

<hbox id="networkProxyCategory"
      class="subcategory"
      hidden="true"
      data-category="paneGeneral">
  <html:h1 data-l10n-id="network-settings-title"/>
</hbox>

<!-- Network Settings-->
<groupbox id="connectionGroup" data-category="paneGeneral" hidden="true">
  <label class="search-header" hidden="true"><html:h2 data-l10n-id="network-settings-title"/></label>

  <hbox align="center"
      data-subcategory="netsettings">
    <description flex="1" control="connectionSettings">
      <html:span id="connectionSettingsDescription"/>
      <html:a is="moz-support-link"
            data-l10n-id="network-proxy-connection-learn-more"
            support-page="prefs-connection-settings"
      />
    </description>
    <separator orient="vertical"/>
    <button id="connectionSettings"
            is="highlightable-button"
            class="accessory-button"
            data-l10n-id="network-proxy-connection-settings"
            search-l10n-ids="
              connection-window2.title,
              connection-proxy-option-no.label,
              connection-proxy-option-auto.label,
              connection-proxy-option-system.label,
              connection-proxy-option-manual.label,
              connection-proxy-http,
              connection-proxy-https,
              connection-proxy-http-port,
              connection-proxy-socks,
              connection-proxy-socks4,
              connection-proxy-socks5,
              connection-proxy-noproxy,
              connection-proxy-noproxy-desc,
              connection-proxy-https-sharing.label,
              connection-proxy-autotype.label,
              connection-proxy-reload.label,
              connection-proxy-autologin.label,
              connection-proxy-socks-remote-dns.label,
          " />
  </hbox>
</groupbox>
</html:template>
+0 −7
Original line number Diff line number Diff line
@@ -306,8 +306,6 @@ var gMainPane = {
    });
    this.updatePerformanceSettingsBox({ duringChangeEvent: false });
    this.displayUseSystemLocale();
    this.updateProxySettingsUI();
    initializeProxyUI(gMainPane);

    if (Services.prefs.getBoolPref("intl.multilingual.enabled")) {
      gMainPane.initPrimaryBrowserLanguageUI();
@@ -466,11 +464,6 @@ var gMainPane = {
      "change",
      gMainPane.updateHardwareAcceleration.bind(gMainPane)
    );
    setEventListener(
      "connectionSettings",
      "command",
      gMainPane.showConnections
    );
    setEventListener(
      "browserContainersCheckbox",
      "command",
+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 */

"use strict";

@@ -242,6 +243,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();

+6 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
<?xml-stylesheet href="chrome://browser/skin/preferences/privacy.css"?>
<?xml-stylesheet href="chrome://browser/content/preferences/letterboxing.css"?>
<?xml-stylesheet href="chrome://browser/content/securitylevel/securityLevelPreferences.css"?>
<?xml-stylesheet href="chrome://browser/content/torpreferences/torPreferences.css"?>

<!DOCTYPE html>

@@ -70,6 +71,7 @@
  <script type="module" src="chrome://global/content/elements/moz-support-link.mjs"/>
  <script src="chrome://browser/content/migration/migration-wizard.mjs" type="module"></script>
  <script type="module" src="chrome://global/content/elements/moz-toggle.mjs"/>
  <script src="chrome://browser/content/torpreferences/bridgemoji/BridgeEmoji.js"/>
</head>

<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
@@ -170,6 +172,9 @@
          <image class="category-icon"/>
          <label class="category-name" flex="1" data-l10n-id="more-from-moz-title"></label>
        </richlistitem>

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

      </richlistbox>

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