Skip to content
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

curl under MinGW seems to not respect wildcard DNS names in "no_proxy" environment variable #2773

62mkv opened this issue Jul 21, 2018 · 3 comments


Copy link

62mkv commented Jul 21, 2018

I did this

I've a set of environment variables HTTP_PROXY, HTTPS_PROXY and NO_PROXY set up on my machine. We have a corporate proxy/firewall that blocks direct access to Internet hosts.

Now, with this setup my Git Extensions stopped fetching from remotes from our own network, because proxy is configured to respond with 502 on attempts to connect to them

I've updated Git for Windows to version 2.18 and curl is now 7.60, so I can do this:

$ curl -vvv
* Uses proxy env variable no_proxy == '*,,localhost,appserver.vagrant,192.168.*.*,'
* Uses proxy env variable https_proxy == ''
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying
* Connected to (------obfuscated-------) port 80 (#0)
* allocate connect buffer!
* Establish HTTP proxy tunnel to
* Server auth using Basic with user 'user.lastname'
> Host:
> User-Agent: curl/7.60.0
> Proxy-Connection: Keep-Alive
< HTTP/1.0 502 Bad Gateway
< Server: Zscaler/5.6
< Content-Type: text/html
< Connection: close
* Received HTTP code 502 from proxy after CONNECT
* CONNECT phase completed!
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Closing connection 0
curl: (56) Received HTTP code 502 from proxy after CONNECT

I expected the following

I expected curl to respect * string in NO_PROXY environment variable.


with export curl does the right thing.

curl/libcurl version

curl 7.60.0 (x86_64-w64-mingw32) libcurl/7.60.0 OpenSSL/1.0.2o (WinSSL) zlib/1.2.11 libidn2/2.0.5 nghttp2/1.32.0
Release-Date: 2018-05-16
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz TLS-SRP HTTP2 HTTPS-proxy MultiSSL Metalink

operating system

Windows 10 x64

Copy link

62mkv commented Jul 21, 2018

some say, that this is by design. May I suggest then to add at least some documentation for *_PROXY related variables available via curl --help ?

Copy link

62mkv commented Jul 21, 2018

seems that adding (not * does the trick (thx @ForNeVeR)

it's also documented in great details in #1208. which is closed but it feels like there's still room for improvement at least on the visibility side

Copy link

bagder commented Jul 21, 2018

Yeah, we should clearly make this easier to find. The NO_PROXY functionality seems to be best documented in this libcurl man page:

bagder added a commit that referenced this issue Aug 24, 2018
@bagder bagder closed this as completed in a7ba60b Aug 24, 2018
falconindy pushed a commit to falconindy/curl that referenced this issue Sep 10, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Nov 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

No branches or pull requests

2 participants