add support for proxy authentication
Merge branch 'refactor' into osx_refactor