Skip to content

Instantly share code, notes, and snippets.

View justahero's full-sized avatar

Sebastian Ziebell justahero

View GitHub Profile
@justahero
justahero / Vagrantfile
Last active March 5, 2018 16:39 — forked from ampedandwired/Vagrantfile
Configure VM / docker with company proxy CNTLM
# put the following content into ~/.vagrant/Vagrantfile
# install plugin vagrant-proxyconf: vagrant plugin install vagrant-proxyconf
VAGRANTFILE_API_VERSION = "2"
def get_proxy_url
# Doesn't support different proxies for different protocols at present
host_proxy = ENV['http_proxy'] || ENV['HTTP_PROXY'] || ENV['https_proxy'] || ENV["HTTPS_PROXY"]
if host_proxy
uri = URI(host_proxy)