title: HTTP request through https Proxy in Go doesn't work
body: <p>I'm going to send http request via ssl proxy in Go.
  Unfortunately, it always fails. Here is my code I have tried.</p>
  
  <pre><code>proxyUrl, err := url.Parse("https://" + proxyURLStr)
  
  transport := &amp;http.Transport{
      Proxy: http.ProxyURL(proxyUrl),
  }
  
  //adding the Transport object to the http Client
  client := &amp;http.Client{
      Transport: transport,
      Timeout:   60 * time.Second,
  }
  
  request, err := http.NewRequest("GET", "https://test.com", nil)
  if err != nil {
      log.Print("Create Request Error - test.com ")
      return -2, invalid_data
  }
  
  random_agent := browser.Random()
  request.Header.Set("User-Agent", random_agent)
  
  // Make request
  response, err := client.Do(request)
  if err != nil {
      log.Println(err)
      current := time.Now()
      elapsed := current.Sub(start)
      log.Printf("test.com is not available. %02d, %02d ", int(elapsed.Minutes()), int(elapsed.Seconds()))
      return -2, invalid_data
  }
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)</p>
  </blockquote>
  
  <p>I coded the same function in Python and tested it — works good.
  But the Go code does not work.</p>