added possibility to use proxy for localhost