Add proxy support

Fixes issue #21