Use the agent from options and default to keep-alive-agent
Added check for proxy before calling ProxyFilter.setAgent