title: Golang tcp-tls over socks5 proxy client
body: <p>I create a dialer via</p>
  <pre class="lang-golang prettyprint-override"><code>dialer := &amp;net.Dialer{}
  </code></pre>
  <p>and a TLS dialer via</p>
  <pre class="lang-golang prettyprint-override"><code>tlsDialer := &amp;tls.Dialer{
      NetDialer: dialer,
      Config:    &amp;tls.Config{InsecureSkipVerify: true},
  }
  </code></pre>
  <p>Then I create a socks5 proxy dialer by using</p>
  <pre class="lang-golang prettyprint-override"><code>proxyDialer, err := proxy.SOCKS5(&quot;tcp&quot;, &quot;127.0.0.1:1080&quot;, nil, proxy.Direct)
  </code></pre>
  <p>How can I connect remote server though the socks5 proxy?<br />
  In other way, how to nest three dialer in the order of <code>net.Dialer-&gt;tls.Dialer-&gt;proxy.Dialer</code> and finally using <code>proxyDialer.Dial(&quot;tcp&quot;, &quot;remote:port&quot;)</code> to connect the server?</p>
  <p>My Env:</p>
  <ul>
  <li>OS: Windows 10 x64</li>
  <li>Golang: 1.16 (no CGO)</li>
  </ul>
  <p>Any help would be greatly appreciated :)
  First time asking question in SOF, if I missed sth to say pls tell me :)</p>