Added functionality to work over proxy server.