Add proxy support. Fixes #36