Add HTTP Proxy support.

Lots of ideas and code from #13, thanks for the starting point!