Adding proxy support. Preparation to support Tor network