Revert "Revert "add proxy support""

This reverts commit 91e86cde67c0f8d56c46fb8c62e4a98f173bb9b6.