contextmanager for http_proxy use