Skip to content

Instantly share code, notes, and snippets.

@fyrz
Last active August 29, 2015 14:17
Show Gist options
  • Save fyrz/d43b702ab7bd01152220 to your computer and use it in GitHub Desktop.
Save fyrz/d43b702ab7bd01152220 to your computer and use it in GitHub Desktop.
Using http proxy in different environments

Linux - bash

export http_proxy=http://192.168.56.1:9999
export https_proxy=http://192.168.56.1:9999

Windows - command shell

set HTTP_PROXY=http://192.168.56.1:9999
set HTTPS_PROXY=http://192.168.56.1:9999

Vagrant - add proxy to vagrant file

Install proxy plugin using the following command:

vagrant plugin install vagrant-proxyconf --plugin-source http://rubygems.org`

See also : https://github.com/tmatilai/vagrant-proxyconf

  # vagrant plugin install vagrant-proxyconf
  if Vagrant.has_plugin?("vagrant-proxyconf")
    config.proxy.http     = "http://192.168.56.1:9999"
    config.proxy.https    = "http://192.168.56.1:9999"
    config.proxy.no_proxy = "localhost,127.0.0.1"
  end

Tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment