Added proxy support for provider, and added spec test

Rewrote parts to avoid duplication, moved proxy_url to params

Avoid duplication