15
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Proxy に負けないで

Last updated at Posted at 2016-01-26

yum

一時的に
# export http(s)_proxy=http://<PROXY_IP>:<PROXY_PORT>
恒久的に

/etc/yum.conf に追加

proxy=http://<PROXY_IP>:<PROXY_PORT>

rpm

一時的に
rpm --httpproxy <PROXY_IP> --httpport <PROXY_PORT>

apt-get

恒久的に

/etc/apt/apt.conf に追加

Acquire::http::proxy "http://<PROXY_IP>:<PROXY_PORT>";

wget

一時的に
# export http(s)_proxy=http://<PROXY_IP>:<PROXY_PORT>
恒久的に
  • 個別ユーザーに

~/.wgetrc に追加

http_proxy=http://<PROXY_IP>:<PROXY_PORT>
  • 全ユーザーに

/etc/wgetrc に追加

http_proxy=http://<PROXY_IP>:<PROXY_PORT>

curl

一時的に
# curl -x <PROXY_IP>:<PROXY_PORT> -L <URL>
恒久的に
  • 個別ユーザーに

~/.curlrc に追加

proxy = http://<PROXY_IP>:<PROXY_PORT>

git

恒久的に
# git config --global http.proxy http://<PROXY_IP>:<PROXY_PORT>
# git config --global https.proxy http://<PROXY_IP>:<PROXY_PORT>

subversion

恒久的に
  • 個別ユーザーに

~/.subversion/servers に追加

[global]
http-proxy-host = <PROXY_IP>
http-proxy-port = <PROXY_PORT>

npm

恒久的に
  • npm コマンドで
# npm config set proxy http://<PROXY_IP>:<PROXY_PORT>
# npm config set https-proxy http://<PROXY_IP>:<PROXY_PORT>

gem

一時的に
  • Gem コマンドで
# gem install <PKG> -r -p http://<PROXY_IP>:<PROXY_PORT>
  • 環境変数で
# export http(s)_proxy=http://<PROXY_IP>:<PROXY_PORT>
恒久的に
  • 個別ユーザーに

~/.gemrc に追加

http_proxy: http://<PROXY_IP>:<PROXY_PORT>

bundler

一時的に
  • 環境変数で
# export http(s)_proxy=http://<PROXY_IP>:<PROXY_PORT>

pip

一時的に
  • pip コマンドで
pip install <PKG> --proxy=http://<PROXY_IP>:<PROXY_PORT>

vagrant

一時的に
  • 環境変数で
# export http(s)_proxy=http://<PROXY_IP>:<PROXY_PORT>

http over telnet via proxy

# telnet <PROXY_IP> <PROXY_PORT>

GET http://www.example.com/ HTTP/1.1

環境変数を全体的に設定

恒久的に
  • 個別ユーザーに

下記のいずれかに追加

  • ~/.bash_profile

    export http://:
    export https://:

  • 全ユーザーに

下記のいずれかに追加

  • /etc/environment
http://<PROXY_IP>:<PROXY_PORT>
https://<PROXY_IP>:<PROXY_PORT>
  • /etc/profile
  • /etc/profile.d/
export http://<PROXY_IP>:<PROXY_PORT>
export https://<PROXY_IP>:<PROXY_PORT>
15
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?