Skip to content

Instantly share code, notes, and snippets.

@ryu1
Last active December 18, 2019 06:35
Show Gist options
  • Select an option

  • Save ryu1/ba006dbab67b7a8bf00fa8486517fd86 to your computer and use it in GitHub Desktop.

Select an option

Save ryu1/ba006dbab67b7a8bf00fa8486517fd86 to your computer and use it in GitHub Desktop.
How To Proxy Settings For MacOSX

Proxy Settings


MacのEthernetのネットワーク設定

  1. LANケーブル(ブルー)をPCに差し込む

  2. ネットワーク環境設定 > Ethernet > 詳細 > プロキシ

  3. 自動プロキシ構成にチェック

  4. プロキシ構成ファイルのURLにhttp://xxxx.xxxxxxx.com/xxxxxxx.datを設定する

network

環境変数

  1. ~/.bashrcや、~/.bash_profileに以下を追記する

    export http_proxy=http://proxy.xxxxxx.co.jp:10080
    export https_proxy=$http_proxy
    export HTTP_PROXY=$http_proxy
    export HTTPS_PROXY=$http_proxy
    
  2. 確認

    $ wget https://yahoo.co.jp
    $ rm index.html
    $ wget https://yahoo.co.jp
    $ rm index.html
    

Curl

  1. ~/.curlrcを作成する

    $ cd ~
    $ touch .curlrc
    
  2. ~/.curlrcに以下を追記する

    proxy = "http://proxy.xxxxxx.co.jp:10080"¬
    
  3. 確認

    $ curl https://yahoo.co.jp
    $ curl http://yahoo.co.jp
    

Git

  1. ~/.gitconfigに以下を追記する

    [http]
     	proxy = http://proxy.xxxxx.co.jp:10080
    [https]
    	proxy = http://proxy.xxxxx.co.jp:10080
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment