It seems it's necessary both in pulling all_proxy from the environment (rebuild_proxies) and deciding which proxy to use (select_proxy). Also added new functional test.