Last Comment Bug 260883 - "No proxy for" does not use FQDN wildcards "*" like IE
: "No proxy for" does not use FQDN wildcards "*" like IE
Status: NEW
[necko-would-take]
:
Product: Core
Classification: Components
Component: Networking (show other bugs)
: Trunk
: x86 Windows XP
: -- enhancement with 8 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Patrick McManus [:mcmanus]
Mentors:
: 1076732 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-21 17:16 PDT by Edward Sargisson
Modified: 2016-01-25 12:34 PST (History)
11 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Edward Sargisson 2004-09-21 17:16:38 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10

In Internet Explorer I can use wildcards to specify websites I don't wish to use
the proxy for. This is important so that I can access internal company websites
(without the proxy) and external websites with the proxy). 

The IP address/class system is not sufficient as I only have the FQDN. The IP
may change. Wildcards are important because I work for a large company with a
large number of machines. Specifying *.auckland.company.com is a lot easier than
having to update the No proxy for for every new internal website I come across.

I have reviewed bugs 91587, 136789 and 229201 and none of them address my concerns.

Reproducible: Always
Steps to Reproduce:
0. Find two names in a DNS server with different hostnames but identical
suffixes such that *.domain will include both names. Setup a proxy that cannot
access the websites attached to these domains but ensure you can access them
without the proxy.
1. Navigate to Tools->Options.. 
2. Click Connection Settings...
3. Specify Manual Proxy Configuration and include *.domain in the No proxy for list.
4. Attempt to go to either domain.

Actual Results:  
Firefox tries to use the proxy and the retrieval fails.

Expected Results:  
Return the webpages without using the proxy.
Comment 1 Christopher Curzio 2004-09-22 04:51:25 PDT
I successfully do exactly what you're saying you need to do with the same
version of Firefox that you're running. The problem is that you're using the
asterisk. (Correct syntax is specified in the connection settings window right
underneath where you specify this information.)

Just put .auckland.company.com in the "No proxy for" box, and all hostnames that
end in .auckland.company.com will not be proxied.

Bug should probably be marked invalid. 
Comment 2 Edward Sargisson 2004-09-22 12:45:08 PDT
Sorry - the repro isn't quite accurate. 
I need to use a proxy for *.company.com but not w3*.company.com
Comment 3 Winona Tong 2004-11-22 11:58:50 PST
Wildcards can also be helpful in instances where you want to specify a range of
addresses, such as 129.97.129.*
Comment 4 Peter Dey 2004-11-30 01:26:29 PST
Afaik, 129.97.129.* can be achieved by doing 129.97.129.0/24
Comment 5 benc 2005-01-06 09:44:06 PST
We passively support a leading "*" by simply stripping it when we convert the
noproxy pref into filters.

Edward: can you give me a specific, one-domain example? (No proxy says "this", I
type "that", and I do(not) connect to my proxy).

I'm concerned because we have a couple Firefox-specific problem reports of stuff
that should work fine.
Comment 6 Edward Sargisson 2005-01-19 20:26:42 PST
I'll give you an example of what I want to express to FireFox.
I want to use the proxy to connect to www.company.com (an external website).
However I do not want to use the proxy to connect to any address of the format
w3-*.company.com (internal websites). I know that in my company there are many
servers of that form e.g. w3-1.company.com, w3-2.company.com, etc.

In IE I would add w3-*.company.com to the No proxy list however FireFox gets
confused by this.
Note that .company.com does not express what I want because that will request
www.company.com without using the proxy.
Comment 7 Steve 2005-06-15 08:28:12 PDT
I have the same issue. I need to access w3-*.company.com with no proxy, but
www.company.com with the proxy.
Comment 8 Gabriel Sjoberg 2005-09-01 12:09:22 PDT
Confirming this, but as an enhancement request rather than a bug.
Comment 9 Jo Hermans 2005-10-13 03:57:39 PDT
*** Bug 312283 has been marked as a duplicate of this bug. ***
Comment 10 benc 2005-10-19 04:24:35 PDT
-> networking. 

I had asked along time ago if anyone needed this.. and nobody said yes. This is
actually the first bug where someone wanted this format that IE has...

Just so you know, this probably requires a good amount of work on our code,
because we are very suffix oriented right now.

I'll add this to the "no proxy" docs as well.

http://www.mozilla.org/quality/networking/docs/aboutno_proxy_for.html
Comment 11 Tristan Miller 2010-04-28 04:09:13 PDT
See also Bug 562307: the Firefox installer should not be happily importing proxy exclusion entries that depend on this missing feature.
Comment 12 Andrea Guglielmi 2013-11-06 02:58:45 PST
Hi,
I'm sorry to bump this up, but I would like to know if any of the devs is aware of this bug/change request.
I'm a consultant and I work on different customer sites every day, so I use the "Lenovo Access Connections" to switch between different configurations. I think that AC just handles IE "no proxy" syntax as it will not change proxy settings if it will find something like "10.0.0.0/8".
I even tried to set Firefox (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 ID:20131105030206 CSet: 770de5942471) to use "System Settings" but it looks like it doesn't handle the "No Proxy" setting.

Will Firefox ever handle the "No proxy" syntax like IE does or, even better, really handle the "Use System Settings"?
Comment 13 serval 2014-04-02 13:30:47 PDT
I just cloned Firefox sources (hg clone http://hg.mozilla.org/mozilla-central/) and tried to find proxy part, I found nothing except elements in configure.in
Looking at this one, it seems Firefox uses a lib called libproxy.
Searching about this, I found https://code.google.com/p/libproxy (and https://code.google.com/p/libproxy/wiki/BuildingFromSource).
1) Is it the good way or am I misleading?
2) If yes, does it mean it's an enhancement to implement in libproxy only?
Comment 14 Patrick McManus [:mcmanus] 2014-04-02 13:47:54 PDT
relevant code seems to be in netwerk/base/src/nsProtocolProxyService.cpp .. look for no_proxies_on and LoadHostFilters()
Comment 15 Hans-Georg Michna 2014-09-10 05:14:24 PDT
I do not understand the entire discussion. Since the Windows/IE proxy exclusions follow entirely different rules, compared to the FF proxy exclusions, it is not even possible to transform the FF settings into IE settings or vice versa.

Windows/IE lets you list host names that *begin* with any of the listed strings, plus they allow the asterisk wildcard character. FF lets you list host names that *end* with any of the listed strings, but they do not understand the asterisk wildcard character. The IP address format is similarly different.

This means that the FF setting "Use system proxy settings" requires new code to interpret the Windows/IE settings, code that is not used with any other setting, otherwise it could not possibly work.

I have not done any exhaustive testing, but I suspect that that settings does, in fact, not work, except in certain trivial cases.

Do I see things correctly?
Comment 16 Vincent Panel 2014-09-10 08:34:43 PDT
Hans-Georg, there's a very nice overview there: https://developer.mozilla.org/en-US/docs/No_Proxy_For_configuration. In the current case. My corporate proxy settings use things like "10.*.*.*" which I have to translate to "10.0.0.0/8". This could be done automatically (indeed using new but rather trivial code). But I also understand there are more complex cases like "www.*.com" which is just impossible to translate into FF syntax.
Comment 17 Hans-Georg Michna 2014-09-10 09:54:33 PDT
Thanks for the link, but the "very nice" overview, just like your message, totally ignores the most significant difference, that the Windows/IE proxy strings represent the beginning of the name, while those in Firefox represent the end.

But I had written that already quite clearly in my preceding comment, and I don't like to have to repeat myself.
Comment 18 Matthias Versen [:Matti] 2014-10-02 03:56:55 PDT
*** Bug 1076732 has been marked as a duplicate of this bug. ***

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