added proxy support, fixes issue #17