Proxy and file download support

Hey,  I needed these functions for one of my projects and thought might be useful for others.It can be improved of course. 

BTW, this is my very first contribution to a public project :)