Bug 1563185 - Port bug 1562084: Description for non-proxying localhost. r=jorgk
authorRichard Marti <richard.marti@gmail.com>
Wed, 03 Jul 2019 12:55:31 +0200
changeset 36033 63f12343e6576da40e0098c70f04ee7790dee33b
parent 36032 5bec03032031f3a35f6e5fd63a4eded96ea49a56
child 36034 8fbca3217e6e712c53529bc952649ce9c7fbb15b
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersjorgk
bugs1563185, 1562084
Bug 1563185 - Port bug 1562084: Description for non-proxying localhost. r=jorgk
mail/components/preferences/connection.js
mail/components/preferences/connection.xul
mail/locales/en-US/chrome/messenger/preferences/connection.dtd
--- a/mail/components/preferences/connection.js
+++ b/mail/components/preferences/connection.js
@@ -143,16 +143,19 @@ var gConnectionsDialog = {
     autologinProxyPref.disabled = proxyTypePref.value == 0;
     var noProxiesPref = Preferences.get("network.proxy.no_proxies_on");
     noProxiesPref.disabled = proxyTypePref.value == 0;
 
     var autoconfigURLPref = Preferences.get("network.proxy.autoconfig_url");
     autoconfigURLPref.disabled = proxyTypePref.value != 2;
 
     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/mail/components/preferences/connection.xul
+++ b/mail/components/preferences/connection.xul
@@ -120,16 +120,18 @@
     </radiogroup>
   </groupbox>
   <separator class="thin"/>
   <label value="&noproxy.label;"
           accesskey="&noproxy.accesskey;"
           control="networkProxyNone"/>
   <html:textarea id="networkProxyNone" rows="2" preference="network.proxy.no_proxies_on"/>
   <label value="&noproxyExplain.label;" control="networkProxyNone"/>
+  <label id="networkProxyNoneLocalhost" control="networkProxyNone" value="&noproxyLocalhostDesc.label;"/>
+  <separator class="thin"/>
   <checkbox id="autologinProxy"
             label="&autologinproxy.label;"
             accesskey="&autologinproxy.accesskey;"
             preference="signon.autologin.proxy"
             tooltiptext="&autologinproxy.tooltip;"/>
   <checkbox id="networkProxySOCKSRemoteDNS"
             preference="network.proxy.socks_remote_dns"
             label="&socksRemoteDNS.label;"
--- a/mail/locales/en-US/chrome/messenger/preferences/connection.dtd
+++ b/mail/locales/en-US/chrome/messenger/preferences/connection.dtd
@@ -33,16 +33,20 @@
 <!ENTITY  HTTPport.accesskey            "p">
 <!ENTITY  SSLport.label                 "Port:">
 <!ENTITY  SSLport.accesskey             "o">
 <!ENTITY  SOCKSport.label               "Port:">
 <!ENTITY  SOCKSport.accesskey           "t">
 <!ENTITY  noproxy.label                 "No proxy for:">
 <!ENTITY  noproxy.accesskey             "n">
 <!ENTITY  noproxyExplain.label          "Example: .mozilla.org, .net.nz, 192.168.1.0/24">
+<!-- LOCALIZATION NOTE (noproxyLocalhostDesc.label): Do not translate
+  localhost, 127.0.0.1 and ::1.
+-->
+<!ENTITY  noproxyLocalhostDesc.label   "Connections to localhost, 127.0.0.1, and ::1 are never proxied.">
 <!ENTITY  shareproxy.label              "Use this proxy server for all protocols">
 <!ENTITY  shareproxy.accesskey          "x">
 <!ENTITY  autologinproxy.label          "Do not prompt for authentication if password is saved">
 <!ENTITY  autologinproxy.accesskey      "i">
 <!ENTITY  autologinproxy.tooltip        "This option silently authenticates you to proxies when you have saved credentials for them. You will be prompted if authentication fails.">
 <!ENTITY  socksRemoteDNS.label          "Proxy DNS when using SOCKS v5">
 <!ENTITY  socksRemoteDNS.accesskey      "d">
 <!ENTITY  dnsOverHttps.label            "Enable DNS over HTTPS">