added support for proxy connect middleware