added possibility to use proxy for localhost

Hi,

I added a config parameter  to indicate that the proxy should also be used for localhost.
Please consider merging.

Thank you.
Regards,
Lorenzo