Add proxy capability to use with s3 client.

Hello Daniel, this is a useful feature; is it ok if I include it in master?