move logic from ProxyManager::Main to ProxyManager::Proxy class