Skip to content

Commit

Permalink
Fix formatting issues caused by bad Prettier config
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewL246 committed Dec 27, 2023
1 parent 40c7321 commit a10fa93
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 68 deletions.
12 changes: 6 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
assignees:
- MatthewL246
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
assignees:
- MatthewL246
73 changes: 36 additions & 37 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,46 @@
name: Build and Publish Docker Image

on:
push:
pull_request:
workflow_dispatch:
push:
pull_request:
workflow_dispatch:

jobs:
build-publish:
runs-on: ubuntu-latest
build-publish:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log into the GitHub container registry
if:
${{ github.event != 'pull_request' && github.ref ==
'refs/heads/main' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log into the GitHub container registry
if:
${{ github.event != 'pull_request' && github.ref == 'refs/heads/main' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
flavor: latest=true
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
flavor: latest=true

- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
push:
${{ github.event != 'pull_request' && github.ref ==
'refs/heads/main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
push:
${{ github.event != 'pull_request' && github.ref ==
'refs/heads/main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
50 changes: 25 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ latest image and is already set up with OpenSSL 1.1.1.
[official instructions](https://docs.docker.com/get-docker/).
2. Run a new Docker container using the `ghcr.io/matthewl246/mitmproxy-pretendo`
image.
- If you're not familiar with Docker, copy the `docker run ...` command from
[this script](./start-docker.sh) to get started. Then, open
<http://127.0.0.1:8081/> in your browser to access the `mitmweb` web
interface for mitmproxy.
- Note that if you delete the `mitmproxy-pretendo-data` volume, the
mitmproxy server certificates will be regenerated and you will need to set
up the SSL patches with your custom certificates again.
- If you're not familiar with Docker, copy the `docker run ...` command from
[this script](./start-docker.sh) to get started. Then, open
<http://127.0.0.1:8081/> in your browser to access the `mitmweb` web
interface for mitmproxy.
- Note that if you delete the `mitmproxy-pretendo-data` volume, the mitmproxy
server certificates will be regenerated and you will need to set up the SSL
patches with your custom certificates again.

#### Rebuilding the Docker image

Expand All @@ -39,7 +39,7 @@ If you want to make modifications to the image, you need to rebuild it locally.
2. Use the `./start-docker.sh` script to build and run the container. This build
overwrites the version you downloaded from the container registry. This will
take a few minutes the first time, but it will be cached for future builds.
- You need to rebuild the container every time you change something here.
- You need to rebuild the container every time you change something here.

If you want to revert your local image to the published version, run
`docker pull ghcr.io/matthewl246/mitmproxy-pretendo`.
Expand All @@ -61,11 +61,11 @@ fail if mitmproxy is using OpenSSL 3.0.0.
3. Create a virtual environment with `python3 -m venv venv`.
4. Activate the virtual environment with `. ./venv/bin/activate`.
5. Install [mitmproxy](https://mitmproxy.org/) with `pip install mitmproxy`.
- Test that mitmproxy is working by running `mitmproxy --version`.
- If the OpenSSL version is above 3.0.0, the console will fail to connect
via HTTPS. Consider using the Docker container instead, or compile a
custom version of OpenSSL and Python cryptography
([see below](#using-a-custom-version-of-openssl-with-mitmproxy)).
- Test that mitmproxy is working by running `mitmproxy --version`.
- If the OpenSSL version is above 3.0.0, the console will fail to connect via
HTTPS. Consider using the Docker container instead, or compile a custom
version of OpenSSL and Python cryptography
([see below](#using-a-custom-version-of-openssl-with-mitmproxy)).
6. Run one of the launcher scripts (i.e. `./mitmproxy`) to launch the mitmproxy
server.

Expand All @@ -77,14 +77,14 @@ to mitmproxy.

1. Install Pretendo Network patches on your console using
[the official guide](https://pretendo.network/docs/install):
- Download the patches for
[Wii U](https://github.com/PretendoNetwork/Inkay/releases) or
[3DS](https://github.com/PretendoNetwork/nimbus/releases).
- Skip creating a PNID on the official Pretendo server if you will be
hosting your own server.
- If you want to use Justaposition, you'll now need to recompile the patches
with your custom certificate
([see below](#compiling-custom-pretendo-patches)).
- Download the patches for
[Wii U](https://github.com/PretendoNetwork/Inkay/releases) or
[3DS](https://github.com/PretendoNetwork/nimbus/releases).
- Skip creating a PNID on the official Pretendo server if you will be hosting
your own server.
- If you want to use Justaposition, you'll now need to recompile the patches
with your custom certificate
([see below](#compiling-custom-pretendo-patches)).
2. Configure your console to connect to the proxy using its system settings. Set
the console's proxy server to your computer's IP address and the port
to 8080.
Expand All @@ -102,10 +102,10 @@ Fortunately, it's pretty easy if you use Docker to compile the patches.
1. Clone the Inkay patcher
(`git clone https://github.com/PretendoNetwork/Inkay.git`)
2. Copy your mitmproxy certificate.
- If you're using the Docker container, run
`docker run -it --rm -v mitmproxy-pretendo-data:/mnt busybox cat /mnt/mitmproxy-ca-cert.pem`.
- If you're running mitmproxy locally, run
`cat .mitmproxy/mitmproxy-ca-cert.pem`.
- If you're using the Docker container, run
`docker run -it --rm -v mitmproxy-pretendo-data:/mnt busybox cat /mnt/mitmproxy-ca-cert.pem`.
- If you're running mitmproxy locally, run
`cat .mitmproxy/mitmproxy-ca-cert.pem`.
3. Replace the contents of `./Inkay/data/ca.pem` with your mitmproxy
certificate.
4. Run `docker build Inkay -t inkay-build` to build the Inkay build environment.
Expand Down

0 comments on commit a10fa93

Please sign in to comment.