vagrant-proxyconfVagrant 代理配置插件

联合创作 · 2023-09-27 01:44

vagrant-proxyconf 是 Vagrant 的代理配置插件。

一个 Vagrant 的插件,配置虚拟机使用指定的代理。如果你是一个公司的代理服务器之后,例如这是有用的,或者你有一个代理缓存(例如Polipo)。

该插件可以设置:

  • 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
浏览 5
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报