命令使用代理
wget/curl 都支持使用代理
wget -e “http_proxy=10.1.4.43:8080″
curl -x 10.1.4.43:8080 proxy.mimvp.com
环境变量使用代理
curl、wget也支持通过环境变量http_proxy来设置要使用的代理server, 例如以下:
# 这个帐号使用的代理server
http_proxy=”http://mycache.mydomain.com:3128″export http_proxy假设代理server须要username和password,仅仅要将它们加入 URL。
比如:username myuser。password mypwd,加入设定:
# 这个帐号使用的代理server和username/password
http_proxy=”http://myuser:mypwd@mycache.mydomain.com:3128″export http_proxy然后直接wget 或者curl 。 就是通过代理来訪问