Persona is no longer an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 31510 - Proxy: localhost and should be proxyable, but not by default
: Proxy: localhost and should be proxyable, but not by default
Product: Core
Classification: Components
Component: Networking (show other bugs)
: Trunk
: x86 Linux
: P3 normal (vote)
: mozilla1.2beta
Assigned To: benc
: benc
: Patrick McManus [:mcmanus]
: 88261 145876 164532 (view as bug list)
Depends on:
Blocks: 160091
  Show dependency treegraph
Reported: 2000-03-11 16:12 PST by Bradley Baetz
Modified: 2003-05-09 13:16 PDT (History)
9 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch to all.js (790 bytes, patch)
2002-10-01 20:55 PDT, benc
no flags Details | Diff | Splinter Review
patch for the mozilla-trunk all.js (36.24 KB, patch)
2002-10-01 23:55 PDT, benc
no flags Details | Diff | Splinter Review
patch to all.js for mozilla-trunk (814 bytes, patch)
2002-10-01 23:58 PDT, benc
doug.turner: review+
darin.moz: superreview+
Details | Diff | Splinter Review

Description Bradley Baetz 2000-03-11 16:12:30 PST
I've been trying out PSM with the latest CVS build.

Clicking on the padlock icon doesn't work because it tries to connect to
http://3@ but this gives me a connection refused error from
the proxy.

I'm using manual proxies since autoproxy doesn't work yet, and didn't have
localhost, listed in the "No proxies for" section. Once I add this,
then it works fine.

I've checked that trying http://{localhost,} tries to go through the
proxy, so its not a PSM problem.

This could be resolved as user error, but if PSM relies on this then I think it
should be the default.
Comment 1 sjlee 2000-03-11 18:00:24 PST
Adding myself to keep me in the loop.
Comment 2 Joseph Elwell 2000-03-12 14:19:54 PST
As far as localhost going through a proxy - I think it should. Netscape 4.X does
this, and if I have my proxy on localhost and/or properly set up then I *want*
localhost to go through the proxy server - especially if I'm using it as some
sort or debugging tool. So, I think this portion of the bug is wontfix or
invalid, which I think the reporter already new - but was just pointing out to
show what is causing problems with the PSM stuff. :)

As far as the PSM stuff going through the proxy - yeah, bad!
marking a duplicate of bug 31164.

*** This bug has been marked as a duplicate of 31164 ***
Comment 3 Tom Everingham 2000-07-05 18:26:57 PDT
verified DUP
Comment 4 benc 2001-05-24 18:27:06 PDT
+qawanted - need to verify behavior in something recent link M0.9.
change summary for searchability.
The duped bug isn't really a dupe.

Joe's point is very good, send everything to the proxy, and use "no proxy" if 
you do not want it to.

If "no proxy" has bugs (and it does), comment here and we'll mark a depends.
Comment 5 benc 2001-05-24 18:27:34 PDT
qa to me.
-> new
Comment 6 benc 2001-05-24 18:37:50 PDT
Bug 80848, might make it so you cannot get out of proxying "localhost".
Comment 7 Bradley Baetz (:bbaetz) 2001-06-05 18:14:26 PDT
Well, I filed this originally, but I can't remember what I was thinking :) It
was mainly PSM bug IIRC - I shouldn't have had to avoid proxying to localhost if
I wasn't expecting to connect there.

A current branch build does allow localhost to be proxied.
Comment 8 jbeams 2001-06-29 07:01:27 PDT
*** Bug 88261 has been marked as a duplicate of this bug. ***
Comment 9 benc 2001-06-29 18:47:10 PDT
+mostfreq  <wow, this is really annoying people...>
Comment 10 benc 2001-06-29 18:47:21 PDT
*** Bug 86449 has been marked as a duplicate of this bug. ***
Comment 11 gabriel 2001-06-30 03:31:20 PDT
I don't see how you can make them proxyable - what if your proxy is on another
server ? IMHO, there should simply be a default entry in 'No proxy for' of, localhost. Then if people *really* want to use a proxy for that
address they can just delete it.
Comment 12 Asa Dotzler [:asa] 2001-12-03 10:49:47 PST
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 
(you can query for this string to delete spam or retrieve the list of bugs I've 
Comment 13 Pádraig Brady 2001-12-20 14:35:58 PST
localhost, should by default be in the "No Proxy For" field.
This is what most people want, and can be easily changed by the minority.
Comment 14 benc 2001-12-20 15:56:08 PST
I think gabriel came up with this idea first, about chaning the defaults.

I've been meaning to make this as my first attempt to patch, but if anyone wants
to do it, go ahead.

I think the idea would be to add the following line to all.js:

pref("network.proxy.no_proxies_on", "localhost,");

Since this is a prefs change, I think this could be done anytime, even for 0.9.7
if someone could come up with a really good reason...
Comment 15 Ian Thomas ('thelem') 2002-02-20 15:04:35 PST
IE has a checkbox 'do not use proxy server for local addresses', by default

I think putting localhost, on do not use proxy for is a better solution.
Comment 16 benc 2002-03-07 20:01:07 PST

I've tested a bunch of combinations of no-proxy so that I know I've got the
correct configuration.

And I think I'm making enough progress getting CVS access, installing compilers
and other build/patch stuff where I will actually be able to build the patch and
submit it soon.

Officially, it would be good for someone to volunteer to qa the change as well...
Comment 17 Matthias Versen [:Matti] 2002-03-12 11:00:26 PST
*** Bug 130296 has been marked as a duplicate of this bug. ***
Comment 18 Matthias Versen [:Matti] 2002-05-20 22:57:28 PDT
*** Bug 145876 has been marked as a duplicate of this bug. ***
Comment 19 Jo Hermans 2002-08-25 12:54:23 PDT
*** Bug 164532 has been marked as a duplicate of this bug. ***
Comment 20 Jo Hermans 2002-08-27 03:34:26 PDT
*** Bug 164802 has been marked as a duplicate of this bug. ***
Comment 21 Geert Poels 2002-08-27 10:59:10 PDT
I know this is not the place to start a discussion on this item but I just 
wanted to add the following : is the loopback address, meant for local (same host) access.
'localhost' is a dns entry with is by RFC bound to, the loopback 
The number of people who intend to use address through a proxy is imho very 
small. But the possibility should exist.
'Correct' behaviour would imho be :
As soon as a user enters a proxy/choose auto proxy, should be added 
as a default in the 'no proxy for' so it can still be deleted.
'localhost' should not be added as it is bound to by default.
<i>The ".localhost" TLD has traditionally been statically defined in host DNS 
implementations as having an A record pointing to the loop back IP address and 
is reserved for such use. Any other use would conflict with widely deployed 
code which assumes this use. </i>
Of course overriding this can still be done on OS level.

I would even go as far as to copy the proxy-ip for all entries when the manual 
HTTP proxy is entered; from a user friendly use point of view
Comment 22 benc 2002-08-27 19:07:47 PDT
localhost has to be included in the fix because we don't do hostname -> IP
conversion when we use the "no proxy" mask, we do a string compare. There is a
bug on this somewhere...
Comment 23 benc 2002-10-01 20:55:35 PDT
Created attachment 101366 [details] [diff] [review]
patch to all.js

I've tested this patch to make sure it changes http://localhost and
Comment 24 benc 2002-10-01 20:56:37 PDT
Okay, I've checked all the dupes, moved the correct ones to Networoking,
verified them all, fixed a couple bad dupes...

Due to limitations in "no proxy for", it might trap or
other hostnames w/ localhost in it.

I also need to check how well manual over-ride works.
Comment 25 benc 2002-10-01 21:15:53 PDT
Okay, patched phoenix's file. oops. I'll patch the other file soon.

Turns out the behavior is this:

new profiles will show the values by default.
However, if you delete them, they will be replaced by "", and that entry in
prefs.js will never clear, so it is basically a one time seed.
Comment 26 benc 2002-10-01 23:55:11 PDT
Created attachment 101381 [details] [diff] [review]
patch for the mozilla-trunk all.js
Comment 27 benc 2002-10-01 23:57:27 PDT
Comment on attachment 101381 [details] [diff] [review]
patch for the mozilla-trunk all.js

that's not a patch!
Comment 28 benc 2002-10-01 23:58:29 PDT
Created attachment 101383 [details] [diff] [review]
patch to all.js for mozilla-trunk
Comment 29 Darin Fisher 2002-10-04 13:33:43 PDT
Comment on attachment 101383 [details] [diff] [review]
patch to all.js for mozilla-trunk


this seems like a reasonable stop-gap measure; although it will do nothing to
help out folks who have modified the no_proxies_on preference in their prefs.js
(via the proxy prefs UI).

ultimately, we need to move some checks into the nsProtocolProxyService to
always disable proxying to localhost.  we might want to pref this check as

also, there's some edge cases that this check will miss.  e.g. "xyzlocalhost"
Comment 30 Doug Turner (:dougt) 2002-10-04 13:58:15 PDT
Comment on attachment 101383 [details] [diff] [review]
patch to all.js for mozilla-trunk

Comment 31 benc 2002-10-04 16:20:01 PDT
Thanks. I don't have cvs checkin for code, only Is the next step
finding someone to cvs checkin to the trunk?
Comment 32 tenthumbs 2002-10-05 06:13:20 PDT
I know this is late but I object to including "localhost". It is just a
string. By convention it is the name for but that's just a
convention. There's no RFC that requires that linkage. In fact, some
installations handle "localhost" in their DNS servers wher it could refer to
almost anything. This patch is based on what works on some machines not what 
is required for all machines.
Comment 33 benc 2002-10-07 16:30:19 PDT
Every DNS server that has "" that I have checked maps back

The underlying problem here is that noproxy just checks the URL string, so there
is no "check the IP post DNS resolution" step. If you don't trap "localhost",
you never will.
Comment 34 benc 2002-10-09 08:22:25 PDT
thanks to sicking for the checkin!
This should be in the trunk before the 1.2 branch, so new profiles in 1.2b and
1.2 should exhibit this as well.
Comment 35 benc 2002-11-20 14:00:33 PST
Comment 36 benc 2002-11-27 00:35:17 PST

Normally, I would not verify my own fix, but this was just a prefs file change.

Looked only at Mac OS X, creation of new profiles does have pre-populated "no
proxy" entries.

Note You need to log in before you can comment on or make changes to this bug.