Skip to content

Instantly share code, notes, and snippets.

@franciscocpg
Last active September 18, 2025 18:08
Show Gist options
  • Save franciscocpg/a4f52afcc00d472a9d7c407db16a92ee to your computer and use it in GitHub Desktop.
Save franciscocpg/a4f52afcc00d472a9d7c407db16a92ee to your computer and use it in GitHub Desktop.

Revisions

  1. franciscocpg revised this gist Feb 26, 2019. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,5 @@
    1. After installing mitmproxy run it in a terminal session and quit.
    This will create the necessaries certificates files at `~/.mitmproxy`:
    `mitmproxy`
    1. After installing mitmproxy run it (just type `mitmproxy`) in a terminal session and quit.
    This will create the necessaries certificates files at `~/.mitmproxy`.

    2. Extract the certificate to `.crt` format:
    `openssl x509 -in ~/.mitmproxy/mitmproxy-ca.pem -inform PEM -out ca.crt`
  2. franciscocpg revised this gist Feb 26, 2019. 1 changed file with 4 additions and 6 deletions.
    10 changes: 4 additions & 6 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    1. After installing mitmproxy run it in a terminal session and quit.
    This will create the necessaries certificates files at `~/.mitmproxy`
    This will create the necessaries certificates files at `~/.mitmproxy`:
    `mitmproxy`

    2. Extract the certificate to `.crt` format:
    2. Extract the certificate to `.crt` format:
    `openssl x509 -in ~/.mitmproxy/mitmproxy-ca.pem -inform PEM -out ca.crt`

    3. Trust the certificate into CA
    3. Trust the certificate into CA:
    `sudo trust anchor ca.crt`

    4. Run the `mitmproxy` again
    @@ -16,7 +16,5 @@ export http_proxy='http://localhost:8080'
    export https_proxy='http://localhost:8080'
    ```

    6. Run a curl to an https site and it should work:
    6. Run a curl to an https site and it should work:
    `curl https://www.google.com`


  3. franciscocpg created this gist Feb 26, 2019.
    22 changes: 22 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    1. After installing mitmproxy run it in a terminal session and quit.
    This will create the necessaries certificates files at `~/.mitmproxy`
    `mitmproxy`

    2. Extract the certificate to `.crt` format:
    `openssl x509 -in ~/.mitmproxy/mitmproxy-ca.pem -inform PEM -out ca.crt`

    3. Trust the certificate into CA
    `sudo trust anchor ca.crt`

    4. Run the `mitmproxy` again

    5. Open another terminal session and set the proxy:
    ```bash
    export http_proxy='http://localhost:8080'
    export https_proxy='http://localhost:8080'
    ```

    6. Run a curl to an https site and it should work:
    `curl https://www.google.com`