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

Difference between --noproxy and --no-proxy? #3906

Closed
HRK44 opened this issue May 20, 2019 · 5 comments

Comments

@HRK44
Copy link

commented May 20, 2019

I can't find any documentation on it, or maybe it's just a weird behavior...

I have a curl command like this (simplified) that it is executed on a server behind a proxy, and I don't want to use the proxy for a specific route :

curl toto:1337/api -> doesn't work because of the proxy

curl toto:1337/api --no-proxy toto:1337/api -> works fine...

curl toto:1337/api --noproxy toto:1337/api -> doesn't work (hits the proxy)

curl toto:1337/api --noproxy toto -> works fine...

Anyone can explain the difference or link to some docs for --no-proxy ?

Thanks

@bagder

This comment has been minimized.

Copy link
Member

commented May 20, 2019

Hi!

Thanks for your interest in curl and related manners, but you seem to have asked a question or help, and this is an issue tracker that we reserve for dealing with issues/bugs really.

Please ask questions and ask for support etc on the dedicated mailing lists. You will also reach a lot more people that way!

--proxy sets the proxy string to use.
--noproxy defines what domains to not use proxy for

--no-proxy is just wrong and should probably generate an error. As it is trying to negate an option that isn't a boolean.

@bagder bagder added cmdline tool and removed not-a-bug labels May 20, 2019
@HRK44

This comment has been minimized.

Copy link
Author

commented May 20, 2019

Hi @bagder

curl toto:1337/api --no-proxy toto:1337/api this works tho in my example, that's why I'm kinda confused...

@bagder

This comment has been minimized.

Copy link
Member

commented May 20, 2019

Yes, because --no-proxy will act exactly like --proxy. The --no- prefix only has a meaning for boolean command line options.

bagder added a commit that referenced this issue May 20, 2019
Reported-by: Olen Andoni
Fixes #3906
@bagder

This comment has been minimized.

Copy link
Member

commented May 20, 2019

I intend to make --no-proxy cause an error since it doesn't make sense. See #3907.

@HRK44

This comment has been minimized.

Copy link
Author

commented May 20, 2019

@bagder thanks !

@HRK44 HRK44 closed this May 20, 2019
bagder added a commit that referenced this issue May 20, 2019
Reported-by: Olen Andoni
Fixes #3906
Closes #3907
@lock lock bot locked as resolved and limited conversation to collaborators Aug 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants
You can’t perform that action at this time.