converted detect-http-proxy to a template to allow for configurable timeout value