mirror of
https://github.com/MatthewL246/mitmproxy-pretendo.git
synced 2026-04-24 15:26:54 -05:00
Revert changes to pretendo_addon.py
It's better to use an actual reverse proxy like nginx instead of using mitmproxy.
This commit is contained in:
parent
183df7c0b1
commit
bd676b372b
|
|
@ -18,46 +18,11 @@ class PretendoAddon:
|
|||
)
|
||||
|
||||
def request(self, flow: http.HTTPFlow) -> None:
|
||||
if not ctx.options.pretendo_redirect:
|
||||
# This script should just be disabled
|
||||
return
|
||||
|
||||
# The account server
|
||||
if "account.nintendo.net" in flow.request.host:
|
||||
flow.request.host = flow.request.host.replace("nintendo.net", "pretendo.cc")
|
||||
flow.request.port = 8080
|
||||
|
||||
if ctx.options.pretendo_redirect:
|
||||
if 'nintendo.net' in flow.request.host:
|
||||
flow.request.host = flow.request.host.replace('nintendo.net', 'pretendo.cc')
|
||||
|
||||
if ctx.options.pretendo_http:
|
||||
flow.request.scheme = "http"
|
||||
|
||||
# The Grove eShop server
|
||||
if "geisha-wup.cdn.nintendo.net" in flow.request.host:
|
||||
flow.request.host = flow.request.host.replace(
|
||||
"geisha-wup.cdn.nintendo.net", "eshop.pretendo.cc"
|
||||
)
|
||||
flow.request.port = 8081
|
||||
|
||||
if ctx.options.pretendo_http:
|
||||
flow.request.scheme = "http"
|
||||
|
||||
# The olv-api Miiverse API server
|
||||
if (
|
||||
"discovery.olv.nintendo.net" in flow.request.host
|
||||
or "api.olv.nintendo.net" in flow.request.host
|
||||
):
|
||||
flow.request.host = flow.request.host.replace("nintendo.net", "pretendo.cc")
|
||||
flow.request.port = 8082
|
||||
|
||||
if ctx.options.pretendo_http:
|
||||
flow.request.scheme = "http"
|
||||
|
||||
# The Juxtaposition Miiverse server
|
||||
elif "olv.nintendo.net" in flow.request.host:
|
||||
flow.request.host = flow.request.host.replace("nintendo.net", "pretendo.cc")
|
||||
flow.request.port = 8083
|
||||
|
||||
if ctx.options.pretendo_http:
|
||||
flow.request.scheme = "http"
|
||||
|
||||
flow.request.scheme = 'http'
|
||||
|
||||
addons = [PretendoAddon()]
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user