0

I'm trying to use Hashicorp Packer to create and upload an AWS VM. I'm behind a http and https proxy, so when I set http_proxy and https_proxy (and HTTP_PROXY and HTTPS_PROXY) I can use the aws cli to see my S3 containers with no problems; however Hashicorp Packer uses the AWS go libraries, and according to https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#configuring-a-proxy and https://golang.org/pkg/net/http/#Transport they +only+ support HTTP_PROXY and not HTTPS_PROXY.

Is there any way I can use the AWS Go library (or packages built using it, like Packer) with a HTTPS proxy?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
user3324033
  • 309
  • 2
  • 4
  • 1
    I would expect HTTP_PROXY to be used for HTTPS too since this what [net.http](https://golang.org/pkg/net/http/#Transport) seems to do when no HTTPS_PROXY is set. Have you tried? – Steffen Ullrich Jul 13 '18 at 18:59
  • you can check out this answer https://stackoverflow.com/questions/51845690/how-to-program-go-to-use-a-proxy/53202838#53202838 – Chinmay Samant Nov 09 '18 at 06:40

1 Answers1

0

It should work just fine with HTTPS_PROXY. The default transport (see https://golang.org/src/net/http/transport.go#L40) uses a ProxyFromEnvironment function (see https://golang.org/src/net/http/transport.go#L259) which you can see supports both HTTP_PROXY and HTTPS_PROXY

boyvinall
  • 1,807
  • 11
  • 8