title: Bypassing HTTP basic auth locally
body: <p>I have two applications which I cannot change:</p>
  
  <p>A: provides a URL protected by HTTP basic auth.
  B: needs to access this URL but does not support basic auth.
  Credentials are available.</p>
  
  <p>How can I make my two applications work together?</p>
  
  <p>I thought a local proxy might be great which injects the authentication. E.g. using socat:</p>
  
  <pre><code>socat TCP4-LISTEN:81,reuseaddr,fork TCP:UrlToA:80,&lt;inject-basic-auth&gt;=user:pass
  </code></pre>
  
  <p>However, socat does not provide an option like &lt; inject-basic-auth >. Anybody knows any tool that might help? Any other way out?</p>