How to set proxy for wget?

后端 未结 13 1879
陌清茗
陌清茗 2020-12-02 03:38

I want to download something with wget using a proxy:

HTTP Proxy: 127.0.0.1
Port: 8080

The proxy does not need username and pa

13条回答
  •  天命终不由人
    2020-12-02 04:20

    After trying many tutorials to configure my Ubuntu 16.04 LTS behind a authenticated proxy, it worked with these steps:

    Edit /etc/wgetrc:

    $ sudo nano /etc/wgetrc
    

    Uncomment these lines:

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

    Change http://proxy.yoyodyne.com:18023/ to http://username:password@domain:port/

    IMPORTANT: If it still doesn't work, check if your password has special characters, such as #, @, ... If this is the case, escape them (for example, replace passw@rd with passw%40rd).

提交回复
热议问题