Skip to content

Instantly share code, notes, and snippets.

@t-oginogin
Last active December 21, 2015 02:39
Show Gist options
  • Save t-oginogin/6236702 to your computer and use it in GitHub Desktop.
Save t-oginogin/6236702 to your computer and use it in GitHub Desktop.

Proxy設定

認証ありProxy経由で外部に接続する環境で苦労したので、設定したものをまとめておきます。

全般

.barshrcに設定を追加

export http_proxy=http://username:password@proxy.example.com:8080/
export https_proxy=https://username:password@proxy.example.com:8080/

export no_proxy=localhost,192.168.1.*

apt-get

/etc/apt/apt.confに設定を追加、もしくは/etc/apt/apt.conf.d/に80proxyを作成

Acquire::http::proxy "http://username:password@proxy.example.com:8080/";

yum

/etc/yum.confに設定を追加

proxy=http://proxy.example.com:8080/
proxy_username=username
proxy_password=password

wget

~/.wgetrcに設定を追加

http_proxy=http://proxy.example.com:8080/
proxy_user=username
proxy_passwd=password

curl

~/.curlrcに設定を追加

proxy=http://username:password@proxy.example.com:8080/

Git

.gitconfigに設定を追加(設定されたもの意外はダイレクトアクセスなのでno_proxy的なものは不要)

[http]
    proxy=http://username:password@proxy.example.com:8080/

RubyGems

~/.gemrcに設定を追加

http_proxy: http://username:password@proxy.example.com:8080

Mercurial

~/.hgrcに設定を追加

    [http_proxy]
    host=http://proxy.example.com:8080
    user=username
    passwd=password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment