set http_proxy=http://username:password@hostname:port
vagrant plugin install vagrant-proxyconf
2. configure the vagrant-proxyconf plugin
Create or edit file $HOME/.vagrant.d/Vagrantfile
Vagrant.configure("2") do |config|
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "http://username:password@hostname:port/"
config.proxy.https = "http://username:password@hostname:port/"
config.proxy.no_proxy = "localhost,127.0.0.1,.example.com"
end
end
3. download box and start vagrant
set HTTPS_PROXY=http://username:password@hostname:port
vagrant up