Skip to content

Instantly share code, notes, and snippets.

@t-chab
Created December 17, 2015 14:06
Show Gist options
  • Save t-chab/de390c25e1820f8a45ba to your computer and use it in GitHub Desktop.
Save t-chab/de390c25e1820f8a45ba to your computer and use it in GitHub Desktop.
Vagrantfile to propagate http_proxy config to guest
Vagrant.configure("2") do |config|
puts "proxyconf..."
if Vagrant.has_plugin?("vagrant-proxyconf")
puts "find proxyconf plugin !"
if ENV["http_proxy"]
puts "http_proxy: " + ENV["http_proxy"]
config.proxy.http = ENV["http_proxy"]
end
if ENV["https_proxy"]
puts "https_proxy: " + ENV["https_proxy"]
config.proxy.https = ENV["https_proxy"]
end
if ENV["no_proxy"]
config.proxy.no_proxy = ENV["no_proxy"]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment