Adding proxy support. Fixes #27