Problem of using proxy with wget in Ubuntu [closed

2019-08-29 07:19发布

Please help me, I want to download file from dev.opennebula.org using command wget but I have a problem with proxy. Now, I have already set the http-proxy value in file /etc/wgetrc and I use command wget --proxy-username=username --proxy-password=password URL but the result is

Connecting to proxy.mmcs:8080 failed: Connection timed out.
Retrying.

I am sure that I set the proxy name and port correctly. How can I do and can I use other commands to download that file.

Thank you.

3条回答
虎瘦雄心在
2楼-- · 2019-08-29 07:56

Inside sudo gedit /etc/bash.bashrc add those lines:

export http_proxy=http://username:password@proxyserver.net:port/
export https_proxy=http://username:password@proxyserver.net:port/
export ftp_proxy=http://username:password@proxyserver.net:port/

Inside sudo gedit /etc/environment add those lines:

http_proxy=http://username:password@proxyserver.net:port/
https_proxy=http://username:password@proxyserver.net:port/
ftp_proxy=http://username:password@proxyserver.net:port/

Inside sudo gedit /etc/apt/apt.conf add those lines:

Acquire::http::Proxy "http://username:password@proxyserver.net:port";
Acquire::https::Proxy "http://username:password@proxyserver.net:port";
Acquire::ftp::Proxy "http://username:password@proxyserver.net:port";

Source: Ubuntu Linux Proxy Settings in company environment.

查看更多
倾城 Initia
3楼-- · 2019-08-29 07:56

Error message says "Connection timed out". For me that looks more like error in establishing the connection the the proxy and not in authentication.

I'd start by debugging following things:

  1. does proxy.mmcs resolv with "host" and can it be pinged
  2. does changing proxy.mmcs into ip address help ?
  3. can i telnet from same host that i try to run wget into the proxy server's port 8080.
查看更多
Viruses.
4楼-- · 2019-08-29 08:07

Try --proxy-user instead of --proxy-username.

查看更多
登录 后发表回答