Bug 1562084 - Description for non proxy-ing localhost r=fluent-reviewers,Gijs,flod
authorJunior Hsu <juhsu@mozilla.com>
Tue, 02 Jul 2019 21:55:15 +0000
changeset 543867 654b39942f88cd88469868de99c948bca718c5d2
parent 543866 fe1c4f01cacbeacb400362f359b7ff7a1b2a7a17
child 543868 7ec11413a2c249d8879154e4416d790587087081
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfluent-reviewers, Gijs, flod
bugs1562084
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1562084 - Description for non proxy-ing localhost r=fluent-reviewers,Gijs,flod Differential Revision: https://phabricator.services.mozilla.com/D36277
browser/components/preferences/connection.js
browser/components/preferences/connection.xul
browser/locales/en-US/browser/preferences/connection.ftl
--- a/browser/components/preferences/connection.js
+++ b/browser/components/preferences/connection.js
@@ -157,16 +157,19 @@ var gConnectionsDialog = {
     autologinProxyPref.disabled = proxyTypePref.value == 0 || autologinProxyPref.locked;
     var noProxiesPref = Preferences.get("network.proxy.no_proxies_on");
     noProxiesPref.disabled = proxyTypePref.value == 0 || noProxiesPref.locked;
 
     var autoconfigURLPref = Preferences.get("network.proxy.autoconfig_url");
     autoconfigURLPref.disabled = proxyTypePref.value != 2 || autoconfigURLPref.locked;
 
     this.updateReloadButton();
+
+    document.getElementById("networkProxyNoneLocalhost").hidden =
+        Services.prefs.getBoolPref("network.proxy.allow_hijacking_localhost", false);
   },
 
   updateDNSPref() {
     var socksVersionPref = Preferences.get("network.proxy.socks_version");
     var socksDNSPref = Preferences.get("network.proxy.socks_remote_dns");
     var proxyTypePref = Preferences.get("network.proxy.type");
     var isDefinitelySocks4 = !socksVersionPref.disabled && socksVersionPref.value == 4;
     socksDNSPref.disabled = (isDefinitelySocks4 || proxyTypePref.value == 0);
--- a/browser/components/preferences/connection.xul
+++ b/browser/components/preferences/connection.xul
@@ -137,16 +137,18 @@
                 preference="pref.advanced.proxies.disable_button.reload"/>
       </hbox>
     </radiogroup>
   </groupbox>
   <separator class="thin"/>
   <label data-l10n-id="connection-proxy-noproxy" control="networkProxyNone"/>
   <html:textarea id="networkProxyNone" preference="network.proxy.no_proxies_on" rows="2"/>
   <label control="networkProxyNone" data-l10n-id="connection-proxy-noproxy-desc" />
+  <label id="networkProxyNoneLocalhost" control="networkProxyNone" data-l10n-id="connection-proxy-noproxy-localhost-desc" />
+  <separator class="thin"/>
   <checkbox id="autologinProxy"
             data-l10n-id="connection-proxy-autologin"
             preference="signon.autologin.proxy" />
   <checkbox id="networkProxySOCKSRemoteDNS"
             preference="network.proxy.socks_remote_dns"
             data-l10n-id="connection-proxy-socks-remote-dns" />
 
   <groupbox>
--- a/browser/locales/en-US/browser/preferences/connection.ftl
+++ b/browser/locales/en-US/browser/preferences/connection.ftl
@@ -60,16 +60,19 @@ connection-proxy-socks4 =
 connection-proxy-socks5 =
     .label = SOCKS v5
     .accesskey = v
 connection-proxy-noproxy = No proxy for
     .accesskey = N
 
 connection-proxy-noproxy-desc = Example: .mozilla.org, .net.nz, 192.168.1.0/24
 
+# Do not translate localhost, 127.0.0.1 and ::1.
+connection-proxy-noproxy-localhost-desc = Connections to localhost, 127.0.0.1, and ::1 are never proxied.
+
 connection-proxy-autotype =
     .label = Automatic proxy configuration URL
     .accesskey = A
 
 connection-proxy-reload =
     .label = Reload
     .accesskey = e