wgetのプロキシ設定 #1

wgetでプロキシの設定を行うには。
方法1。wgetrcにhttp_proxy、ftp_proxyを設定する。こんな感じ。wgetrcは、pkgsrcでインストールしている場合/usr/pkg/etc/wgetrcにあると思う。/usr/pkg/etc/wgetrcを~/.wgetrcにコピーしてもOK。

# You can set the default proxies for Wget to use for http and ftp.
# They will override the value in the environment.
http_proxy = http://localhost/
ftp_proxy = http://localhost/

方法2。環境変数http_proxy、ftp_proxyを設定する。

$ http_proxy=http://localhost wget http://d.hatena.ne.jp/ha-tan/

ソースを見ると、wgetrcの方が優先みたい。