如何配置 wget 代理


在開了全局代理的情況下,wget 與 git 一樣,也需要再配置代理

方法一:參數設置

wget -e http_proxy=127.0.0.1:1089 google.com



--2020-03-01 11:53:55--  http://google.com/

Connecting to 127.0.0.1:1089... connected.

Proxy request sent, awaiting response... 301 Moved Permanently

Location: http://www.google.com/ [following]

--2020-03-01 11:53:57--  http://www.google.com/

Reusing existing connection to 127.0.0.1:1089.

Proxy request sent, awaiting response... 200 OK

Length: unspecified [text/html]

Saving to: ‘index.html’



index.html                               [ <=>                                                                 ]  12.56K  --.-KB/s    in 0s



2020-03-01 11:54:01 (160 MB/s) - ‘index.html’ saved [12863]

方法二:配置文件設置

進入目錄

cd ~

創建.wgetrc配置文件

n vim .wgetrc

設置代理

http_proxy = http://your_proxy:port

https_proxy = http://your_proxy:port

proxy_user = user

proxy_password = password

use_proxy = on

wait = 15


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM