Skip to content

Instantly share code, notes, and snippets.

@nwinkler
Created March 10, 2015 07:51
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nwinkler/b40affc41835761ed43b to your computer and use it in GitHub Desktop.
Save nwinkler/b40affc41835761ed43b to your computer and use it in GitHub Desktop.
Vagrant-proxyconf configuration using the host's proxy environment variables

vagrant-proxyconf with host proxy environment variables

To use the proxy environment variables of the host OS, insert the snippet into your Vagrantfile. Instead of having to manually define the proxy settings, it will use the settings from the host shell where you run Vagrant.

You need to install the vagrant-proxyconf plugin for this to work:

vagrant plugin install vagrant-proxyconf
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = ENV['http_proxy']
config.proxy.https = ENV['https_proxy']
config.proxy.no_proxy = ENV['no_proxy']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment