title: How to allow curl via a local proxy?
body: <p>According the the <a href="http://www.charlesproxy.com/documentation/configuration/browser-and-system-configuration/" rel="noreferrer">Charles Proxy configuration page</a>, you can manually set up a proxy if you use  your localhost with port 8080.</p>
  
  <p>The syntax is <code>curl --proxy localhost:8080 http://google.com/</code></p>
  
  <p>However, this is not working for me. Here is my syntax and results - i'm also using the <code>-v</code> option for debugging:</p>
  
  <pre><code>curl -v --proxy localhost:8080 http://google.com/
  
  * About to connect() to proxy localhost port 8080 (#0)
  *   Trying 127.0.0.1... Connection refused
  *   Trying ::1... Connection refused
  *   Trying fe80::1... Connection refused
  * couldn't connect to host
  * Closing connection #0
  curl: (7) couldn't connect to host
  </code></pre>
  
  <p>I can connect to localhost:8080 in the web browser, and the results are logged in the proxy. However this is not working, the connecting is refused and nothing is logged.</p>
  
  <p>So far I have also tried:</p>
  
  <pre><code>- executing this as root
  - using 127.0.0.1 instead of localhost
  - using wget instead of curl
  - disabling the system firewall
  </code></pre>
  
  <p>What am I doing wrong? What else can I try?</p>