[b]"How to Use 'curl no proxy' to Bypass Proxy Settings?"[/b] or [b]"Why Isn't 'curl no proxy' Working for My Requ

14 Replies, 899 Views

"Why isn't curl no proxy working for my requests?"

Hey folks,

So I’m trying to bypass my system’s proxy settings using curl no proxy, but it’s just... not working? Like, I’ve tried `--noproxy '*'` and even `--noproxy` (lol, typo, fixed it), but curl still seems to use the proxy.

Am I missing something?

Also, does curl no proxy override *all* proxy configs, or just some? My env vars are set, but idk if that’s messing with it.

Thanks for any tips!

---

*(ps: if this is a dumb question, pls be gentle haha)*
Hey! Had the same issue last week. Turns out curl no proxy doesn’t override env vars like `HTTP_PROXY` or `ALL_PROXY`. Try unsetting those first with `unset HTTP_PROXY HTTPS_PROXY` before running your curl command.

Also, `--noproxy '*'` should work, but maybe your curl version is old? Check with `curl --version`.

If all else fails, use `--proxy ""` to force no proxy. Hope that helps!
lol yeah, curl no proxy can be tricky. It *should* override everything, but sometimes system settings are stubborn.

Have you tried `curl --noproxy localhost,127.0.0.1,yourdomain.com` instead of just `'*'`? Wildcards don’t always play nice.

Also, double-check your `.curlrc` file if you have one—it might be forcing a proxy.
Dude, I feel your pain. curl no proxy is weirdly inconsistent. One thing that worked for me:

`curl -v --noproxy "*" http://example.com`

The `-v` flag lets you see if curl is *actually* bypassing the proxy. If it’s still using one, the verbose output will show it.

Also, maybe your network admin is forcing a proxy? Corporate networks love to do that.
Quick tip: curl no proxy ignores env vars *only* if you explicitly set `--noproxy`. But if your system’s proxy is hardcoded (like in `/etc/environment`), curl might still use it.

Try this:
`curl --noproxy "*" --proxy "" http://example.com`

The `--proxy ""` is a nuclear option—forces no proxy no matter what. Works every time for me.
Not a dumb question at all! curl no proxy behavior depends on *how* the proxy is set. If it’s via env vars, `--noproxy` should work. If it’s system-wide, you might need to tweak OS settings.

For debugging, use `strace curl --noproxy "*" http://example.com` to see if curl is even *trying* to bypass the proxy.

Also, check out curl’s docs on GitHub—they have a whole section on proxy quirks.
Yo, thanks for all the replies! Didn’t realize env vars could mess with curl no proxy like that. Tried `unset HTTP_PROXY` and `--proxy ""`, and it finally worked!

Still weird that `--noproxy "*"` didn’t override it, but hey, whatever works. Gonna check my curl version too—might be outdated.

Appreciate the help!
Ugh, proxies are the worst. curl no proxy *should* work, but here’s a wild idea: are you on Windows? Sometimes the OS overrides curl’s settings.

Try `netsh winhttp show proxy` to see if Windows is forcing one. If yes, `netsh winhttp reset proxy` might fix it.

Otherwise, `curl --proxy "noproxy"` is a last-resort hack.



Users browsing this thread: 1 Guest(s)