Add proxy support. Fixes #31