Adding set_proxy

I have made two commits: one for https-only because I could't test connection through http proxy, but it should works as well.