refactor http proxy and timeout