vagrant-proxyconfVagrant 代理配置插件
vagrant-proxyconf 是 Vagrant 的代理配置插件。
一個 Vagrant 的插件,配置虛擬機使用指定的代理。如果你是一個公司的代理服務器之后,例如這是有用的,或者你有一個代理緩存(例如Polipo)。
該插件可以設(shè)置:
-
generic http_proxy etc. environment variables that many programs support
-
default proxy configuration for all Chef provisioners
-
作為Apt代理配置
-
作為Docker代理配置
-
作為Git代理配置
-
作為npm代理配置
-
作為PEAR代理配置
-
作為Subversion代理配置
-
作為Yum的代理配置
-
簡單的Windows代理配置
配置
Vagrant.configure("2") do |config|
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "http://192.168.0.2:3128/"
config.proxy.https = "http://192.168.0.2:3128/"
config.proxy.no_proxy = "localhost,127.0.0.1,.example.com"
end
# ... other stuff
end評論
圖片
表情
