title: How to get HTTPS endpoints to proxy successfully in WireMock?
body: <p>I am writing an HTTP record-playback proxy which internally uses WireMock, and am having a problem with recording HTTPS targets. HTTP sites work fine.</p>
  
  <p>Here is how I set up the WireMock proxy for an unencrypted site:</p>
  
  <pre><code>java \
      -jar /var/proximate/wiremock-standalone-2.4.1.jar \
      --port 9000 \
      --proxy-all http://ilovephp.jondh.me.uk \
      --record-mappings \
      --root-dir /remote/experiment/record/http
  </code></pre>
  
  <p>I then can record anything on that site using this command:</p>
  
  <pre><code>wget -e use_proxy=yes -e http_proxy=proximate-proxy:9000 \
      http://ilovephp.jondh.me.uk/en/tutorial/make-your-own-blog
  </code></pre>
  
  <p>In short order I will get some automatically created mappings:</p>
  
  <pre><code>/ # ls -R /remote/experiment/record/http
  /remote/experiment/record/http:
  __files   mappings
  
  /remote/experiment/record/http/__files:
  body-tutorial-make-your-own-blog-tWrNm.txt
  
  /remote/experiment/record/http/mappings:
  mapping-tutorial-make-your-own-blog-tWrNm.json
  </code></pre>
  
  <p>Here is much the same thing, but on an SSL site. Proxy first:</p>
  
  <pre><code>java \
      -jar /var/proximate/wiremock-standalone-2.4.1.jar \
      --port 9000 \
      --proxy-all https://www.rottentomatoes.com/ \
      --record-mappings \
      --root-dir /remote/experiment/record/https \
      --verbose
  </code></pre>
  
  <p>And here is the fetch:</p>
  
  <pre><code>wget -e use_proxy=yes -e http_proxy=proximate-proxy:9000 \
      https://www.rottentomatoes.com/
  </code></pre>
  
  <p>The result from WireMock is that the internal cache directories are created, but they do not contain anything:</p>
  
  <pre><code>/ # ls -R /remote/experiment/record/https
  /remote/experiment/record/https:
  __files   mappings
  
  /remote/experiment/record/https/__files:
  
  /remote/experiment/record/https/mappings:
  </code></pre>
  
  <p>I am using WM 2.4.1 on Alpine 3.4 in a Docker container. Do I need to use some of the <code>https</code>-specific command line switches to get this to work?</p>
  
  <h2>Update</h2>
  
  <p>I was temporarily heartened to see that recent release <a href="https://github.com/tomakehurst/wiremock/releases/tag/2.5.0" rel="noreferrer">2.5.0</a> had a recent merge of <code>https-bind-address-bug</code>, which sounded very relevant. I have tried with this release, but unfortunately it makes no difference.</p>