Proxy Community
How to properly configure wget proxy in /etc/wgetrc? or Best way to set up wget proxy via /etc/wgetrc - 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 to properly configure wget proxy in /etc/wgetrc? or Best way to set up wget proxy via /etc/wgetrc (/thread-how-to-properly-configure-wget-proxy-in-etc-wgetrc-or-best-way-to-set-up-wget-proxy-via-etc-wgetrc)

Pages: 1 2


How to properly configure wget proxy in /etc/wgetrc? or Best way to set up wget proxy via /etc/wgetrc - vpnDart88 - 18-12-2024

"Why isn't my wget proxy /etc/wgetrc working? Pls help!"

Hey guys,

So I’ve been trying to set up a wget proxy in /etc/wgetrc, but it’s just not taking the settings. I added these lines:

```
http_proxy = http://myproxy:8080
https_proxy = http://myproxy:8080
```

But wget still ignores it and goes direct. Am I missing something?

Also, do I need to restart anything after editing /etc/wgetrc? Or is there some hidden syntax rule?

Kinda frustrating lol. Any tips?

---

*Or a shorter version:*

"Correct syntax for wget proxy /etc/wgetrc?"

Quick q: what’s the right way to set a wget proxy in /etc/wgetrc?

Tried a few formats but no luck. Does it need quotes? Full URL?

Thx!


“” - secureDash99 - 22-02-2025

Hey, had the same issue last week! Turns out /etc/wgetrc needs root permissions to edit, and sometimes the file is read-only. Did you use sudo when editing? Also, check if there’s a .wgetrc in your home dir overriding it.

Try running `wget --debug` to see if it’s even reading the proxy settings. Might give you a clue.


“” - ghostRun77 - 08-03-2025

Yo, you might wanna try this format instead:

```
use_proxy = on
http_proxy = http://myproxy:8080/
https_proxy = http://myproxy:8080/
```

The trailing slash and `use_proxy` line sometimes make a difference. Also, no restart needed—wget reads it on the fly.


“” - secureJumpX99 - 10-03-2025

Check if your proxy requires auth! If it does, you’ll need to add:

```
proxy_user = your_username
proxy_password = your_password
```

Btw, if you’re on a shared system, /etc/wgetrc might be locked down. Try ~/.wgetrc instead.


“” - vpnSprint99 - 26-03-2025

Had this exact problem. Two things:

1. Make sure there’s no typo in the proxy URL. Even a missing colon or wrong port breaks it.
2. Some distros ignore /etc/wgetrc unless you force it. Try `wget --no-check-certificate` to see if it’s a SSL issue.


“” - ghostVoyX - 29-03-2025

Lol, wget proxy /etc/wgetrc can be finicky. Did you check the file permissions? Run `ls -l /etc/wgetrc` to see if it’s readable by your user.

Also, maybe your proxy’s just down? Test with `curl -x http://myproxy:8080 http://example.com` to rule that out.


“” - FirewallDrifter99 - 30-03-2025

Forget /etc/wgetrc for a sec—have you tried env vars?

```
export http_proxy=http://myproxy:8080
export https_proxy=http://myproxy:8080
```

Then run wget. If that works, your /etc/wgetrc might be ignored by config precedence.


“” - DarkSeekerX - 31-03-2025

Man, wget proxy /etc/wgetrc issues are the worst. Double-check if your proxy supports HTTP—some only do HTTPS. Also, maybe your network’s blocking non-proxy traffic?

Try `strace wget http://example.com 2>&1 | grep proxy` to see if wget even tries to use it.


“” - maskedPioneerX - 31-03-2025

Quick tip: some systems load /etc/wgetrc.d/*.conf instead of /etc/wgetrc. Check if that’s the case for you.

Also, if you’re behind a corporate proxy, they might force their own settings. Annoying, but worth asking IT.


“” - vpnDart88 - 01-04-2025

Hey, thanks for all the suggestions! Turns out my /etc/wgetrc was write-protected—had to sudo edit it. Also, the proxy needed auth, which I totally missed.

One last q: does wget cache proxy settings? Had to reboot to make it stick, which seems weird.

(And yeah, the `use_proxy = on` line fixed it. Thx!)