From 513e4a2a3aee8f5e3738ec4447b8161b62ca5dff Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 18 Aug 2013 20:29:54 -0600 Subject: [PATCH] builder/digitalocean: use HTTP proxy if in env --- builder/digitalocean/api.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/builder/digitalocean/api.go b/builder/digitalocean/api.go index af99c2418..a476f5efb 100644 --- a/builder/digitalocean/api.go +++ b/builder/digitalocean/api.go @@ -43,7 +43,11 @@ type DigitalOceanClient struct { // Creates a new client for communicating with DO func (d DigitalOceanClient) New(client string, key string) *DigitalOceanClient { c := &DigitalOceanClient{ - client: http.DefaultClient, + client: &http.Client{ + Transport: &http.Transport{ + Proxy: http.ProxyFromEnvironment, + }, + }, BaseURL: DIGITALOCEAN_API_URL, ClientID: client, APIKey: key,