Extract set_proxy and unify log