title: Http get request through socks5 | EOF error
body: <p><strong>What I'm trying to do:</strong><br>
  Build a package (later usage) that provides a method to execute a get-request to any page through a given socks5 proxy.</p>
  
  <p><strong>My problem:</strong><br>
  When ever I try to request a page with SSL (https) I get the following error:</p>
  
  <blockquote>
    <p>Error executing request Get <a href="https://www.xxxxxxx.com" rel="nofollow noreferrer">https://www.xxxxxxx.com</a>: socks connect tcp 83.234.8.214:4145->www.xxxxxxx.com:443: EOF</p>
  </blockquote>
  
  <p>However requesting <code>http://www.google.com</code> is working fine. So there must be a problem with the SSL connection. Can't imagine why this isn't working as I'm not very experienced with SSL-connections. <code>End of file</code> makes no sense to me.</p>
  
  <p><strong>My current code:</strong>  </p>
  
  <pre><code>func main() {
      // public socks5 - worked when I created this question
      proxy_addr := "83.234.8.214:4145"
  
      // With this address I get the error
      web_addr := "https://www.whatismyip.com"
  
      // Requesting google works fine
      //web_addr := "http://www.google.com"
  
      dialer, err := proxy.SOCKS5("tcp", proxy_addr, nil, proxy.Direct)
      handleError(err, "error creating dialer")
  
      httpTransport := &amp;http.Transport{}
      httpClient := &amp;http.Client{Transport: httpTransport}
  
      httpTransport.DialTLS = dialer.Dial
  
      req, err := http.NewRequest("GET", web_addr, nil)
      handleError(err, "error creating request")
  
      httpClient.Timeout = 5 * time.Second
  
      resp, err := httpClient.Do(req)
      handleError(err, "error executing request")
  
      defer resp.Body.Close()
      b, err := ioutil.ReadAll(resp.Body)
      handleError(err, "error reading body")
  
      fmt.Println(string(b))
  }
  
  func handleError(err error, msg string) {
      if err != nil {
          log.Fatal(err)
      }
  }
  </code></pre>
  
  <p>So what am I missing in here to deal with ssl-connections?</p>
  
  <p>Thank you very much.</p>
  
  <hr>
  
  <p><strong>Edit 1:</strong>  </p>
  
  <p>In case someone would think this is an issue with <code>whatismyip.com</code> I've done some more tests:  </p>
  
  <ul>
  <li><a href="https://www.google.com" rel="nofollow noreferrer">https://www.google.com</a>
  
  <ul>
  <li>EOF error  </li>
  </ul></li>
  <li><a href="https://stackoverflow.com">https://stackoverflow.com</a>  
  
  <ul>
  <li>EOF error  </li>
  </ul></li>
  <li><a href="https://www.youtube.com/" rel="nofollow noreferrer">https://www.youtube.com/</a>  
  
  <ul>
  <li>EOF error  </li>
  </ul></li>
  </ul>