title: Configure proxy setting for Chef client
body: <p>I have <code>chef-client</code> cookbook in my run list. In my environment I have some proxy attributes. Something similar to</p>
  
  <pre><code>"chef_client": {
    "config": {
      "http_proxy": "http://proxy.com:3128",
      "https_proxy": "http://proxy.com:3128",
      "no_proxy": "*.mydomain.com, localhost"
    }
  </code></pre>
  
  <p>When I start the client manually after ssh to my machine these settings are not used it seems. So <code>sudo chef-client</code> does not seem to use these settings.</p>
  
  <p>To fix this I opened <code>/etc/chef/client.rb</code> on the machine and added proxy settings. </p>
  
  <p>Of course this is not the Chef way to configure a proxy server. How should I do this?</p>