zxxx 大佬有话说 :
wget/curl 命令使用代理
国内机器跑分的时候,有些脚本下载不下来,这时候可以通过使用代理来下载
设置环境变量:
不带口令
export http_proxy=http://your-ip-address:port
export https_proxy=https://your-ip-address:port
带口令
export http_proxy=http://user:password@your-proxy-ip-address:port
export https_proxy=https://user:password@your-proxy-ip-address:port
取消代理
unset http_proxy
unset https_proxy
curl 使用命令行参数:[]内可选部分
protocol: http https socks5
curl -x ‘<proxyhost[:port]>’ url
wget 使用命令行参数:
wget –proxy=on –proxy-user "username" –proxy-password "password" url
wget 使用~/.wgetrc 优先级高于环境变量:
use_proxy = on
proxy_user=username
proxy_password=password
http_proxy =http://proxy.server.address:port/
https_proxy =http://proxy.server.address:port/
或者
use_proxy = on
http_proxy =http://username:[email protected]:port/
https_proxy =http://username:[email protected]:port/
wget 不使用代理命令行参数:
wget –no-proxy FILE_URL
微笑丶在脸上 大佬有话说 :
谢谢分享
3721 大佬有话说 :
到时候转载了
iks 大佬有话说 :
不错,先收藏
嗷嗷 大佬有话说 :
马克
dossr 大佬有话说 :
国内nat必须啊,收藏了
手握键盘 大佬有话说 :
proxychains wget https://www.google.com.hk
proxychains curl https://www.google.com.hk