2

I recently solved my problem How to check if Network Proxy is really applied? Now I can use sudo apt-get install application-name easily - but the problem is that the normal user (not the superuser) cannot see the proxy.

For example, these commands have different outputs:

wget http://whatismyip.com

and

sudo wget http://whatismyip.com

It shows that the first command does not use the proxy while the second clearly says:

Connecting to localhost|127.0.0.1|:8080... connected.

the strange thing is that when I check http://whatismyip.com with Firefox, it shows the proxy IP not my real IP, which means that Firefox sees the proxy.

Why can't wget see the proxy?

Alexar
  • 1,416

2 Answers2

2

Did you check that after doing Apply System-wide... that the following things happen :

  1. the file /etc/environment has entries with the proxy settings you specified.
  2. Any terminal program launched after closing the Network proxy dialog has the proxy variables set in their environment ?

    set | grep -i proxy
    

    should give you entries like this

    https_proxy = http://proxy.yoyodyne.com:18023/
    http_proxy = http://proxy.yoyodyne.com:18023/
    ftp_proxy = http://proxy.yoyodyne.com:18023/
    

wget as per the manual would use these proxies. I have it working at my laptop at work.

Are you sure, you have provided the wget command to a terminal process that was launched after the Network Proxy dialog was closed ?

koushik
  • 5,132
1

I think this may actually be bug 232469, which has some proposed fixes and workarounds. One of them seems to be to edit /etc/wgetrc as root, and scroll down to where you see this:

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
#https_proxy = http://proxy.yoyodyne.com:18023/
#http_proxy = http://proxy.yoyodyne.com:18023/
#ftp_proxy = http://proxy.yoyodyne.com:18023/

Uncomment (remove the #) and set the proxies you want to use. Save and close. This should set global wget-specific settings for all users, and should be an adequate workaround until the bug is resolved.

You can also add these settings to ~/.wgetrc and it will take effect on a per-user basis.