Proxy Community
How do I properly configure a wget proxy in /etc/wgetrc? or What's the correct way to set up a wget p - Printable Version

+- Proxy Community (https://proxycommunity.com/forum)
+-- Forum: Technical Community Support (https://proxycommunity.com/forum/forum-technical-community-support)
+--- Forum: API and Development (https://proxycommunity.com/forum/forum-api-and-development)
+--- Thread: How do I properly configure a wget proxy in /etc/wgetrc? or What's the correct way to set up a wget p (/thread-how-do-i-properly-configure-a-wget-proxy-in-etc-wgetrc-or-what-s-the-correct-way-to-set-up-a-wget-p)

Pages: 1 2 3


How do I properly configure a wget proxy in /etc/wgetrc? or What's the correct way to set up a wget p - shadowVoyagerX - 31-12-2024

"What's the correct way to set up a wget proxy using /etc/wgetrc?"

Hey folks,

I'm trying to configure a wget proxy in /etc/wgetrc but keep hitting snags.

I added these lines:
```
http_proxy = http://proxy.example.com:8080
https_proxy = http://proxy.example.com:8080
```
But wget still ignores it. Am I missing something?

Also, should I uncomment anything else in the file?

Kinda new to this, so any tips on the proper wget proxy /etc/wgetrc setup would be clutch.

Thanks!


“” - proxyDash77 - 02-03-2025

Hey! Had the same issue last week. Make sure you're editing the right file—sometimes people mix up `/etc/wgetrc` and `~/.wgetrc`.

Also, try adding `use_proxy=on` right above your proxy lines. Wget can be picky about that.

If it still doesn’t work, check if your proxy needs auth with `proxy_user` and `proxy_passwd`.


“” - stealthXchange_88 - 30-03-2025

Yo, just a quick tip: after editing `/etc/wgetrc`, did you restart your terminal or reload wget? Sometimes it caches the old config.

Also, double-check the proxy URL—typos are sneaky! Maybe test the proxy with `curl -x http://proxy.example.com:8080 http://example.com` to see if it’s alive.


“” - proxyShifter66 - 30-03-2025

For wget proxy /etc/wgetrc, you might wanna try setting env vars too. Run:

```
export http_proxy=http://proxy.example.com:8080
export https_proxy=http://proxy.example.com:8080
```

Then test wget. If it works, you know the issue is with the file, not the proxy itself.


“” - proxyByteX88 - 30-03-2025

Dude, uncomment the `#https_proxy` and `#http_proxy` lines in `/etc/wgetrc` first! Wget ignores commented stuff, obviously.

Also, if you’re on a system with `systemd`, check if some global config is overriding your settings.


“” - proxyCipher99 - 04-04-2025

Pro tip: Use `wget --debug` to see if it’s even reading `/etc/wgetrc`. Might help pinpoint where it’s failing.

And yeah, like others said, `use_proxy=on` is clutch. Forgot that once and wasted an hour debugging.


“” - shadowVoyagerX - 06-04-2025

OP reply:
Whoa, thanks for all the tips! Didn’t realize `use_proxy=on` was missing—that fixed it.

Quick Q: Is there a way to test if wget is using the proxy without hitting a live site? Like a dry-run flag?

Also, good call on the env vars—totally forgot about those. Gonna clean up my `/etc/wgetrc` now. Cheers!


“” - dataVoyX99 - 07-04-2025

If you’re behind a corp proxy, they might block non-authenticated requests. Try adding:

```
proxy_user = your_username
proxy_passwd = your_password
```

But be careful—don’t leave passwords in plaintext! Maybe use `~/.wgetrc` with tighter permissions instead.


“” - ozitoFast77 - 07-04-2025

Check if SELinux or AppArmor is blocking wget from reading `/etc/wgetrc`. Run `audit2allow` on Linux if you see denials in logs.

Also, `strace wget URL` might show if it’s even trying to use the proxy.


“” - hyperPioneerX - 08-04-2025

For wget proxy /etc/wgetrc, sometimes the file needs strict permissions. Try `chmod 644 /etc/wgetrc` if it’s too restrictive.

And yeah, uncommenting lines is a must. Wget won’t magically read commented configs.