Chinaunix首页 | 论坛 | 博客
  • 博客访问: 189717
  • 博文数量: 49
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 465
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-16 13:37
文章分类

全部博文(49)

文章存档

2009年(13)

2008年(36)

我的朋友

分类: LINUX

2009-01-06 09:45:25

How To Use Wget Through Proxy

Wget is a super-useful utility to download pages and automate all types of web related tasks. It works for HTTP as well as FTP URL's. Here is a brief tutorial on how to use wget through proxy server.

To get wget to use a proxy, you must set up an environment variable before using wget. Type this at the command prompt / console:
For Windows:
set http_proxy=http://proxy.example.com:8080

For Linux/Unix:
export http_proxy="http://proxy.example.com:8080"

Replace proxy.example.com with your actual proxy server.
Replace 8080 with your actual proxy server port.

You can similarly use ftp_proxy to proxy ftp requests. An example on Linux would be:
export ftp_proxy="http://proxy.example.com:8080"

Then you should specify the following option in wget command line to turn the proxy behavior on:
–proxy=on

Alternatively you can use the following to turn it off:
–proxy=off

You can use –proxy-username="user name" –proxy-passwd="password" to set proxy user name and password where required.
Replace user name with your proxy server user name and password with your proxy server password. Another alternative is to specify them in http_proxy / ftp_proxy environment variable as follows:
export http_proxy=

 

阅读(1919) | 评论(0) | 转发(0) |
0

上一篇:VirtualBox

下一篇:回家

给主人留下些什么吧!~~