Simplify proxy setting code to allow for passing further environmental settings in the future #2