Added proxy support. Closes issue #5