Cargo on Windows behind a corporate proxy
<p>I think this is a very common issue among those who want to use Cargo with Windows at work; I have seen multiple GitHub issues and forum posts related to it, but none of the answers solved my problems. </p>

<p>Whenever I try to build some code pointing to a crates.io crate, I get the following error:</p>

<pre class="lang-none prettyprint-override"><code> Downloading &lt;package&gt;
error: unable to get packages from source

Caused by:
  failed to download package &lt;package&gt; from &lt;package address&gt;

Caused by:
  SSL connect error
</code></pre>

<p>What can I do to fix this? I know that Cargo can use the settings at <code>.cargo/config</code> and that the proxy details can be included there, but it doesn't work for me, with or without specifying the path for the certificate (I used the one distributed with curl), like below:</p>

<pre><code>[http]
proxy = "http://user:password@proxy-address.xyz:port"
cainfo = "cert.pem"

[https]
proxy = "https://user:password@proxy-address.xyz:port"
cainfo = "cert.pem"
</code></pre>

<p>The proxy specified in the config file works for any other purpose.</p>

<p>I'm using Windows 7 64bit, Rust 1.11 GNU and Cargo bundled with it. How can I get this working? Currently I have to resort to downloading crate sources manually from their repositories and specifying <code>paths = [...]</code> for each of them in the Cargo config file.</p>