Commit 8216a289 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 ad0c58fd
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -70,6 +70,7 @@ DIRS += [
    "uitour",
    "uitour",
    "urlbar",
    "urlbar",
    "torcircuit",
    "torcircuit",
    "torpreferences",
]
]


DIRS += ["build"]
DIRS += ["build"]
+0 −49
Original line number Original line Diff line number Diff line
@@ -797,53 +797,4 @@
    />
    />
  </hbox>
  </hbox>
</groupbox>
</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-wpad.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-checkbox.label,
              connection-proxy-socks-remote-dns.label,
          " />
  </hbox>
</groupbox>
</html:template>
</html:template>
+0 −7
Original line number Original line Diff line number Diff line
@@ -313,8 +313,6 @@ var gMainPane = {
    });
    });
    this.updatePerformanceSettingsBox({ duringChangeEvent: false });
    this.updatePerformanceSettingsBox({ duringChangeEvent: false });
    this.displayUseSystemLocale();
    this.displayUseSystemLocale();
    this.updateProxySettingsUI();
    initializeProxyUI(gMainPane);


    if (Services.prefs.getBoolPref("intl.multilingual.enabled")) {
    if (Services.prefs.getBoolPref("intl.multilingual.enabled")) {
      gMainPane.initPrimaryBrowserLanguageUI();
      gMainPane.initPrimaryBrowserLanguageUI();
@@ -517,11 +515,6 @@ var gMainPane = {
      "change",
      "change",
      gMainPane.updateHardwareAcceleration.bind(gMainPane)
      gMainPane.updateHardwareAcceleration.bind(gMainPane)
    );
    );
    setEventListener(
      "connectionSettings",
      "command",
      gMainPane.showConnections
    );
    setEventListener(
    setEventListener(
      "browserContainersCheckbox",
      "browserContainersCheckbox",
      "command",
      "command",
+9 −0
Original line number Original line Diff line number Diff line
@@ -15,6 +15,7 @@
/* import-globals-from findInPage.js */
/* import-globals-from findInPage.js */
/* import-globals-from /browser/base/content/utilityOverlay.js */
/* import-globals-from /browser/base/content/utilityOverlay.js */
/* import-globals-from /toolkit/content/preferencesBindings.js */
/* import-globals-from /toolkit/content/preferencesBindings.js */
/* import-globals-from ../torpreferences/content/connectionPane.js */


"use strict";
"use strict";


@@ -231,6 +232,14 @@ function init_all() {
    register_module("paneSync", gSyncPane);
    register_module("paneSync", gSyncPane);
  }
  }
  register_module("paneSearchResults", gSearchResultsPane);
  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();
  gSearchResultsPane.init();
  gMainPane.preInit();
  gMainPane.preInit();


+5 −0
Original line number Original line Diff line number Diff line
@@ -48,6 +48,7 @@
  />
  />


  <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelPreferences.css" />
  <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="branding/brand.ftl"/>
  <link rel="localization" href="browser/browser.ftl"/>
  <link rel="localization" href="browser/browser.ftl"/>
@@ -91,6 +92,7 @@
  <script src="chrome://browser/content/preferences/findInPage.js"/>
  <script src="chrome://browser/content/preferences/findInPage.js"/>
  <script src="chrome://browser/content/migration/migration-wizard.mjs" type="module"></script>
  <script src="chrome://browser/content/migration/migration-wizard.mjs" type="module"></script>
  <script type="module" src="chrome://browser/content/backup/backup-settings.mjs"></script>
  <script type="module" src="chrome://browser/content/backup/backup-settings.mjs"></script>
  <script src="chrome://browser/content/torpreferences/bridgemoji/BridgeEmoji.js"/>
</head>
</head>


<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
@@ -203,6 +205,8 @@
                      value="paneTranslations"
                      value="paneTranslations"
                      helpTopic="prefs-translations"/>
                      helpTopic="prefs-translations"/>


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

      </richlistbox>
      </richlistbox>


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