Closed Bug 48718 Opened 24 years ago Closed 20 years ago

Proxy: "No proxy for" does not support "*.domain" format (leading wildcard only)

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

VERIFIED FIXED
Future

People

(Reporter: jce2, Assigned: darin.moz)

References

Details

(Keywords: meta)

Attachments

(1 file)

I can't use mozilla for submitting forms on my companies intranet because
mozilla is ignoring the
"no proxy for" field set in preferences and getting those pages from the proxy
anyways.

Marking nsbeta3 and 4xp because this bug keeps me from using mozilla for day to
day tasks
on the intranet. I have to use IE instead. :-(
Ok, NOW I'm marking it 4xp and nsbeta3.
Keywords: 4xp, nsbeta3
Tom, can you confirm?
Keywords: qawanted
Whiteboard: [NEED INFO]
If this was indeed still a problem then this is a plus!
Whiteboard: [NEED INFO] → [NEED INFO][nsbeta3+]
Ok, after a bit of experimentation, i've found that the problem isn't quite as
serious as I originally thought, but it is still BAD, and needs to
be fixed before RTM.

As per other web browsers, I originally entered "*.trimble.co.nz; *.trimble.com"
into that field, and that did NOT work (ie all requests still went
through the proxy). Then I started entering in complete domain names
("helpdesk.trimble.co.nz", "webfoot.trimble.com") and that DID work. But
I have to enter the full domain name for EACH web site that I don't want to go
through the proxy. My list will probably be 40 domain names
or longer by the time I've found all the domains that break from going through
the proxy.

This is NOT an acceptable work-around for RTM. It's bloody annoying for me, it's
going to be IMPOSSIBLE for people who don't even understand what a proxy is. We
NEED to handle wildcards properly in the no proxy field so a sys-admin can set
it ONCE and forget about it.

Also, we need to tell users (ON the dialog) that the separator between items is
a comma and NOT a semicolen. IE (blah) uses ";" to separate
items in that field, and I only realized that I was supposed to be using commas
instead after reading the code!

Changed summary to state the real problems. The problem isn't that much better
from the user's point of view, they're going to throw in "*.companyname.com",
find that it doesn't work, and then assume that the feature doesn't work. It
still needs to be nsbeta3+
Summary: "Don't use proxy for these url's" being IGNORED. → "Don't use proxy for these url's" does not accept wildcard characters, and is poorly documented
Ah this is a known problem (I forget the dup) but the simplest workaround is to
remove the * and everything would work just fine. So change your entries 

from *.trimble.co.nz to .trimble.co.nz
and *.trimble.com to .trimble.com 

the other bug is just about interpretting *. Anyway marking nsbeta3- since it
has a workaround and otherwise no_proxies_for does work. 
Whiteboard: [NEED INFO][nsbeta3+] → [nsbeta3-]
WOOHOO!! That worked!
Given this workaround, I agree with nsbeta3-. But the POOR DOCUMENTATION problem
still stands. I'm going to open a new bug for that.

Most users wouldn't think to use host.deny and host.allow syntax in that field.
:P :-) (It's a HORRIBLE syntax anyways...since WHEN should white space == "*" ?)
We should eventually change it to handle *'s anyways..that shouldn't be that
difficult.

I'm marking this bug relnote3 if my other (new) bug isn't fixed for nsbeta3. One
way or another, we need to tell the user what the syntax for that field is. I'm
changing the description of this bug to drop the "poor documentation" part,
because that's going to be the new bug.
Keywords: relnote3
Summary: "Don't use proxy for these url's" does not accept wildcard characters, and is poorly documented → "Don't use proxy for these url's" does not accept wildcard characters
Ok, I've created bug 49858 to deal with the user-interface issue.

If we fix that, then relnote3 can go away.

Downgrading severity to "trivial"
Severity: normal → trivial
Removing relnote3 because the fix for bug# 49858 was checked in. Now this bug 
doesn't make people think that excluding domains from proxies is broken, it's 
just merely annoying for people who disagree with host.deny parsing. :P :-)
Keywords: relnote3
Target Milestone: --- → Future
Does this create problems when importing settings from NS 4.x?  If it does, it 
needs a relnote.
We have a number of test servers referred to purely by their IP addresses,
currently the only way to put these into Mozilla's "No proxy for" box is to
specify each IP address individually. As they're class B IP addresses the first
two bytes of the IP addresses are always the same, it's the last two that differ.

eg The IP addresses 151.101.20.3, 151.101.20.4 and 151.101.55.2 all need to be
added in, currently they would all need to be entered individually.

There doesn't seem to be any way to specify a wildcard for the end of an
address, as "151.101.*" doesn't work, neither does "151.101." or "151.101".
qa to me, -qa wanted
cleared keywords, nominated nsbeta1, nsdogfood
severity -> major, platforms to all, reset milestone
Remaining issues, still in mozilla 0.9:

1- Migration: will the new format break migrated prefs?
2- Documentation: is this detailed and correct outside the Prefs UI note
3- IP network address wildcards (bug 80918)
Severity: trivial → major
OS: Linux → All
QA Contact: tever → benc
Hardware: PC → All
Summary: "Don't use proxy for these url's" does not accept wildcard characters → Proxy: "No proxy for" problems (m0.9+)
Target Milestone: Future → ---
Target Milestone: --- → mozilla1.0
RELNOTE:
"
No Proxy for: does not support the *.domain syntax. If you migrate, remove any
"*" characters that appear.
"
Keywords: meta, relnote
Blocks: 104166
I'm not sure if wildcards in the middle of domain names (like www.*.com) makes
sense. I'm also not sure if assignee of bug 80918 gonna fix domain name
wildcards as well as wildcards for IP addresses, but allowing '*' as prefix
in no-proxy domain names is as simple as 'np++;' :-)

I also suspect that line 650 of nsProtocolProxyService.cpp should read
hp->host = new nsCString(np, (portLocation? portLocation : endproxy) - np);
instead of
hp->host = new nsCString(np, endproxy-np);
i.e., don't include port number in hostname portion.
(I assume, that nsIURI::GetHost() strips out port number)
Keywords: patch, review
I'll try and wrap this in earliar.
Keywords: mozilla1.0
Target Milestone: mozilla1.0 → mozilla0.9.8
*** Bug 113988 has been marked as a duplicate of this bug. ***
to 0.9.9
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Target Milestone: mozilla0.9.9 → mozilla1.0
Depends on: 136789
What IE says:
"
You can use wildcards to match domain and host names or addresses - for
example, www.*.com; 128.*, 240.*, *.mygroup.*, *x*, and so on."
IMHO, we should make sure their no-proxy lists still work when users transfer 
from IE to mozilla. 

I'm trying to figure out how to support one wildcard in domain names or ip 
addresses. Patch coming...
You can fork off perl interpreter to get power of full futured regexp
engine matching wildcards
Depends on: 154784
Depends on: 154798
Depends on: 80917, 80918
Blocks: 172083
gagan: can you retarget or future or reassing this bug?

This bug discussion is focused on improving wildcard support, so I've removed
the meta aspects of this bug to bug 172083.
No longer blocks: 172083
Keywords: meta
Summary: Proxy: "No proxy for" problems (m0.9+) → Proxy: "No proxy for" needs better wildcard support
No longer depends on: 80917, 80918, 136789, 154784, 154798
Blocks: 172083
How does this bug related to bug 80918?
This talks about how various hostname and DNS wildcard combinations would be
desirable and/or needed for 4xp.

The other bug is about wildcards for IP addressing. The order of significance
for DNS and IP addresses is different, so the underlying logic seems like it
could be different as well.
Summary: Proxy: "No proxy for" needs better wildcard support → Proxy: "No proxy for" needs better DNS/hostname wildcard support
reset owner and milestone. Chimera depends on this now.
Assignee: gagan → dougt
Keywords: mozilla1.0
Target Milestone: mozilla1.0 → ---
reassigning to darin.
Assignee: dougt → darin
now that bug 80918 has been fixed, what really remains?  is this bug simply a
duplicate of that bug?
Depends on: 80918
How can I specify for Mozilla that it should use "no proxy for" URLs in which
the server name contains no periods ('.')?

My problem is that in my intranet there are lots of pages refering to others
with URLs not using the FQDN of servers but their simple names.  Mozilla is
using the proxy for these links and I would like to tell it not to do so.

Perhaps one could extend the sintax of the "no proxy for" line in a way similar
to what you can use to specify searches in Google.  Things like "site:.br". 
Here are a two suggestions out of my hat:

* "re:/REGEXP/": this would allow the specification by a regular expression,
which, BTW, would allow me to solve my problem with "re:/^[^.]+$/".

* "net:IPADDR[/MASK]": this would allow the specification by IP addresses and
netmasks.  Note that this would force the browser to perform name resolutions
even though it's using a proxy, which would have a performance impact.
darin: I think this is a bit broader than the IP wildcard bugs you fixed. See
comment #17. Some of those forms of wildcards don't make sense, maybe we
shouldn't support everything...
Severity: major → enhancement
Target Milestone: --- → Future
Gustavo: see bug 91587 for your concerns about hostnames. As for extending the
syntax further, I think we should stay away from that, if you want to get fancy,
use PAC. We would be better off thinking about either of the following:

1- freezing the behavior and documenting it.
2- testing vs. IE for interoperability.
3- adding aspects that are more basic, like IPv6.

Adding features to the manual inteface is really a losing proposition because
there is a three dimenionsal complexity problem (DNS addressing, IP addressing,
and protocol support).

Keeping PAC fully functional would be better, we could always create a manual
interface that is a front end for PAC.
benc: Ok, I agree with you about keeping the syntax simple.  It's just that it's
so simple as to not being enough for my needs.  But I'm not going to push it.

From what I read in this thread an in bug 91587 there seems to be different
issues being discussed together.

While reading all this I found out an answer to my problem.  Since I use just a
small number of internal webservers I put all their names in the "no proxy for"
form along with my domains name.  It's like this:
".cpqd.com.br,gnu,mailer,intranet,verdoc".

This way, when I follow links like "http://gnu/..." Mozilla doesn't use the
proxy as I wanted.

This works and is fine while the number of internal webservers is small. 
However, if one had to specify tens of servers it would be really usefull to be
able to tell Mozilla to use "no proxy for" URLs where the server name has no
dots in it.

BTW where can I find documentation about the syntax of a PAC file?
Now I use PAC, and I am very happy with it as it manage all the exceptions quite
efficiently. however I have ONE question : what happens if the client (mozilla)
can t get connected to the web server where the proxy definitions are stored ?
is there any local cache on the mozilla client (in case of web server down for
instance) ?

We should have a way (not necessarily in the UI. the about:config method is
fine) to tell mozilla to cache the PAC definitions (if it is not the case) and
tell him about the TTL in an failed to connect to PAC server scenario.

My two cents.. :)
you can also just store your PAC file on the local filesystem, and enter a
file:// URL into the proxy preferences panel.
I have to append the port number (app server port) of a LAN host in Firebird's
"No Proxy for:"  dialog before i can actually view the host on that port :/

e.g. I'm trying to reach: http://hostname:7001
If i enter the following in my "no proxy for:" dialog:
"[..], hostname" -  it doesnt work
but
"[..], hostname:7001" - it does.
nDorfin: please create a new bug for thsi problem.
Keywords: nsdogfood, relnote
Whiteboard: [nsbeta3-]
Blocks: 242453
From looking at the code, "*" is allowed as a first character on each filter
term. By ignoring it, the behavior  gives the effect of wildcard support, but
only for prefixes.

RESOLVED/FIXED by depends on 80918.
Testcases and verification coming up.
No longer blocks: 242453
Severity: enhancement → major
Status: NEW → RESOLVED
Closed: 20 years ago
Depends on: 44980
Keywords: meta
Resolution: --- → FIXED
Summary: Proxy: "No proxy for" needs better DNS/hostname wildcard support → Proxy: "No proxy for" does not support wildcards correctly
*** Bug 242453 has been marked as a duplicate of this bug. ***
V/fixed:
These lines were added in bug 80918:
            if (str.First() == '*')
                 startIndex = 1; // *.domain -> .domain
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=mozilla/netwerk/base/src&command=DIFF_FRAMESET&file=nsProtocolProxyService.cpp&rev2=1.44&rev1=1.43

I've tested a couple domains w/ leading "*" in a couple cases. Re-opened the
last dupe, because that was a report this is broken in Firefox.

Status: RESOLVED → VERIFIED
No longer depends on: 44980
Summary: Proxy: "No proxy for" does not support wildcards correctly → Proxy: "No proxy for" does not support "*.domain" format (leading wildcard only)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: