socat port forwarding for https
<p>I can use <code>socat</code> for the port forwarding like this:</p>

<pre><code>socat TCP4-LISTEN:8080 TCP4:123.456.789.12:80
</code></pre>

<p>In this case, it works perfectly: all <code>http</code>-requests to <code>localhost:8080</code> will be redirected to <code>123.456.789.12:80</code>.</p>

<p>But how can I use such forwarding for <code>https</code>-requests?</p>

<p><strong>UPDATE:</strong> I need a single <code>socat</code> process between Firefox and remote server. <code>socat</code> is just a forwarder (proxy redirector), nothing more. Something like this:</p>

<pre><code>Firefox -&gt; socat -&gt; server
       ------------&gt;
           https
</code></pre>