- proxy サーバを指定する場合は、http_proxy, https_proxy 環境変数を設定する
export https_proxy="http://${PROXY_SERVER}:${PROXY_PORT}"
export http_proxy="http://${PROXY_SERVER}:${PROXY_PORT}"
export ftp_proxy="http://${PROXY_SERVER}:${PROXY_PORT}"
- proxy サーバでの認証が必要な必要な場合は、以下のようにする:
export https_proxy="http://username:password@${PROXY_SERVER}:${PROXY_PORT}"
export http_proxy="http://username:password@${PROXY_SERVER}:${PROXY_PORT}"
export ftp_proxy="http://username:password@${PROXY_SERVER}:${PROXY_PORT}"
- 大文字バージョンしか認識しないプログラムの場合は、以下が必要:
export HTTP_PROXY="http://${PROXY_SERVER}:${PROXY_PORT}"
export HTTPS_PROXY="https://${PROXY_SERVER}:${PROXY_PORT}"
export FTP_PROXY="ftp://${PROXY_SERVER}:${PROXY_PORT}"
- proxy を利用しないアドレスの指定
export no_proxy="127.0.0.1,localhost"
export NO_PROXY="$no_proxy"