Added support for proxy type

Added support for using SOCKS 4/5 proxies.