For one GNU Wget run, set the proxy explicitly without editing wgetrc:

wget -e use_proxy=on \
  -e https_proxy=http://203.0.113.10:8080 \
  -e no_proxy= \
  --timeout=10 --tries=1 \
  -O - https://example.com/

Replace the documentation address with your HTTP proxy, or an entry from the HTTP proxy list for a one-run test. The target uses HTTPS, so Wget selects https_proxy; its http:// value describes the intermediary. For an HTTP destination, set http_proxy instead. Merely changing the website URL while configuring only https_proxy does not preserve the route.

SettingEffect in this invocation
-e use_proxy=onEnable proxy use explicitly.
-e no_proxy=Clear destination bypasses for this isolated test.
--tries=1Avoid repeated attempts through an unresponsive entry.
--timeout=10Set Wget's network timeouts; this is not a single elapsed-time deadline for the whole download.
-O -Write the body to standard output. Choose a filename, or omit it, when you want a saved file.

Startup files can override proxy values inherited from the environment; the explicit -e values make this command's route visible. Preserve intentional bypasses in permanent application configuration. Remove --no-proxy from any command intended to test the endpoint.

Keep diagnostic output, normally on standard error, separate from the downloaded body. Connection refusal, tunnel rejection and a destination HTTP error need different next checks; the mere appearance of a file cannot identify them. If a similarly named shell command rejects these options, check wget --version to confirm GNU Wget.

Related articles