For HTTP destinations, set lowercase http_proxy. curl deliberately ignores uppercase HTTP_PROXY. In a POSIX shell:

http_proxy=http://127.0.0.1:8080 curl http://example.com/
https_proxy=http://127.0.0.1:8080 curl https://example.com/

These assignments apply only to the command they precede. Replace the example listener with your proxy; for a public-endpoint comparison, use a candidate from the HTTP proxy list. The https_proxy variable selects a route for HTTPS destinations; an http:// value still means an ordinary HTTP proxy that can tunnel the destination. PowerShell and Windows command shells use different assignment syntax.

Why this one uppercase spelling is dangerous

CGI environments can turn incoming request headers into uppercase HTTP_ variables. A request header named Proxy can therefore become HTTP_PROXY. Trusting it as outbound configuration would let request data choose a proxy. curl's lowercase requirement avoids that mapping; the exception does not apply identically to HTTPS and other protocol variables.

If changing the variable does not change the route

Look for a protocol-specific variable first, then the ALL_PROXY fallback. A matching NO_PROXY rule can bypass the proxy. Lowercase variants and competing definitions also matter. This Unix-like shell loop reports presence without printing credential-bearing values:

for name in http_proxy HTTP_PROXY https_proxy HTTPS_PROXY all_proxy ALL_PROXY no_proxy NO_PROXY; do
  if printenv "$name" >/dev/null; then
    printf '%s is set\n' "$name"
  fi
done

Inspect the listed definitions locally. If one reappears, check the launching shell, service, IDE, container or CI configuration. Presence identifies possible inputs; it does not tell you which value won.

To isolate one request from those proxy choices, supply both the endpoint and an empty bypass list:

curl --proxy http://127.0.0.1:8080 --noproxy '' --connect-timeout 5 --max-time 15 --verbose https://example.com/

For an allowed direct comparison:

curl --noproxy '*' --connect-timeout 5 --max-time 15 --verbose https://example.com/

These commands help separate an inherited route from a connectivity failure. Read the proxy test results stage by stage before changing more environment settings. Apply curl's variable rules to curl; an application's own runtime can discover and merge proxies differently.

Mikanda mikatakata