Added support for proxies and protocol selection