Fix some issues when bootstrapping behind proxies.

These bits are necessary when bootstrapping a new node that needs to
access a proxy. May want to consider separating the HTTP versus HTTPS
proxies.