Use bind mount for mitmproxy config

This commit is contained in:
Matthew Lopez 2023-12-18 20:43:34 -05:00
parent 2bd74b71c4
commit d745c3b91d
No known key found for this signature in database
GPG Key ID: 302A6EE3D63B7E0E
3 changed files with 30 additions and 14 deletions

View File

@ -2,6 +2,7 @@ name: pretendo-network
version: "3.8"
services:
mitmproxy-pretendo:
image: ghcr.io/matthewl246/mitmproxy-pretendo:main
build: ./repos/mitmproxy-pretendo
ports:
# Proxy server
@ -9,6 +10,9 @@ services:
# Mitmweb interface
- 127.0.0.1:8081:8081
volumes:
- type: bind
source: ./config/mitmproxy.yaml
target: /home/mitmproxy/mitmproxy-config.yaml
- type: volume
source: mitmproxy-pretendo-data
target: /home/mitmproxy/.mitmproxy

26
config/mitmproxy.yaml Normal file
View File

@ -0,0 +1,26 @@
# See https://docs.mitmproxy.org/stable/concepts-options/ for documentation
listen_port: 8080
web_port: 8081
# Make sure that the right configuration files and certs are loaded
client_certs: ./client-certificates/WiiU-common.pem
confdir: ./.mitmproxy
# Enable the Pretendo redirection script
scripts: ["../pretendo_addon.py"]
pretendo_redirect: true
pretendo_host: nginx
pretendo_host_port: 80
pretendo_http: true
# Allow self-signed certificates
ssl_insecure: true
# Allow the console to use older TLS versions
tls_version_client_min: UNBOUNDED
tls_version_server_min: UNBOUNDED
# A few convenience features
anticache: true
showhost: true

View File

@ -1,14 +0,0 @@
diff --git i/mitmproxy-config.yaml w/mitmproxy-config.yaml
index b9a4877..2e157a4 100644
--- i/mitmproxy-config.yaml
+++ w/mitmproxy-config.yaml
@@ -10,6 +10,9 @@ confdir: ./.mitmproxy
# Enable the Pretendo redirection script
scripts: ["../pretendo_addon.py"]
pretendo_redirect: true
+pretendo_http: true
+pretendo_host: nginx
+pretendo_host_port: 80
# Allow self-signed certificates
ssl_insecure: true