How to set proxy for wget?

后端 未结 13 1888
陌清茗
陌清茗 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:18

    export http_proxy=http://proxy_host:proxy_port/
    export https_proxy=https://proxy_host:proxy_port/
    

    or

    export http_proxy=http://username:password@proxy_host:proxy_port/
    export https_proxy=https://username:password@proxy_host:proxy_port/
    

    As all others explained here, these environment variable helps to pass on proxies.

    Note: But please not that if the password contains any special character then that needs to be configured as %.

    Example: If the password is pass#123, need to be used as pass%23123 in above export commands.

提交回复
热议问题