refactoring proxy config