-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please document syntax and semantics of NO_PROXY environment variable. #1208
Comments
The current curl (7.52.2) is as follows:
The value should be example.com if it wants to match example.com
The value can specify subdomains in presence or absence of the dot (e.g. .example.com or example.com)
The value matches subdomains on any level (e.g. foo.example.com and foo.bar.example.com etc.) if it is the same as parent domain (e.g. example.com).
If the value specify subdomains and parent domain (e.g. somewhere.example.com), I suggest that add the following description to documentations.
(I apologize for my poor English.) |
@eramoto Thank you for answering my questions. Another question is how to specify ip (v4, v6) addresses? I guess matching hosts/ip addresses is something also used by DNS resolvers and HTTP servers. I wonder if what curl does is in line with other software? This just begs to be included in some RFC... |
If a direct accessed host has a ip address (e.g. http://192.168.100.2/foobar), you should specify the ip address (e.g. 192.168.100.2) and you can not specify a subnet mask etc.(e.g. 192.168.100.0/24). Because not do DNS lookup and treat ip address as domain when test for a match.
I hardly know anything about other software do. |
I guess with the difference that domain is matched from the right end and the ip address from the left end, right?
|
I think that the rightful behavior is what you said.
I try to fix it (and any documentation). |
I highly doubt above is true as matching ip addresses this way makes no sense.
I guess there's some error above as this is the same string ( |
There's https://github.com/libproxy/libproxy library which aims to unify getting proxy configuration and which is used by growing number of apps. I wanted to compare how they treat NO_PROXY environment variable but it seems there's no documentation for this library – see libproxy/libproxy/issues/52
Looking at the second file above libproxy would match There's libproxy-bin Fedora package with a helper binary called Ideally libcurl would use libproxy and we would have uniform way to get proxy configuration... If not then maybe both projects could at least treat NO_PROXY the same way? |
See #977 for a libproxy pull request. I have my doubts about the library quality though, and I'm not sure it is a responsible action for us to add support for it without it being taken care of better. |
Thank you for pointing out issue with libproxy support. |
@piotr-dobrogost commented on Jan 19:
I think there's confusion here. It seems to me like the code does not |
Curl's man page about
NO_PROXY
:Curl's manual about
NO_PROXY
:Description in the manual lacks information about asterisk and description in the man page should use phrasing from the manual which is more specific than the general list of host names phrase used.
In addition, even description from the manual is not specific enough. From https://curl.haxx.se/mail/archive-2007-11/0043.html :
It seems that behavior was cloned but not the documentation which is very unfortunate taking into consideration that curl's behavior is very often the informal specification of many aspects of dealing with HTTP.
The documentation should answer at least the following questions:
example.com
should the value beexample.com
orexample.com.
(trailing dot) or either is allowed?.example.com
matchfoo.example.com
andfoo.bar.example.com
and so forth?*.example.com
but notexample.com
?The text was updated successfully, but these errors were encountered: