tmatilai / vagrant-proxyconf

Vagrant plugin that configures the virtual machine to use proxies
MIT License
531 stars 74 forks source link

Docs suggestion- reference ENV["http_proxy"] #111

Closed jpvlsmv closed 5 years ago

jpvlsmv commented 9 years ago

I have a suggestion for the documentation.

Since my system sits behind a proxy, all the Vagrant guests I spin up must have the proxy setting configured (and some system magic occasionally changes the env variables if I move around)

I add to my ~/.vagrant.d/Vagrantfile the following:

Vagrant.configure("2") do |config|
# Set up HTTP proxy based on environment
  if Vagrant.has_plugin?("vagrant-proxyconf")
    config.proxy.http     = ENV["http_proxy"]
    config.proxy.https    = ENV["https_proxy"]
  end
end
codylane commented 5 years ago

Very clever idea, however, I feel like folks will forget that they configured this and may cause problems for people down the road.

To make things portable, I'd highly recommend putting this in all your Vagrantfiles.