Skip to content

Commit

Permalink
Make overseauspider.yuanshen.com reachable
Browse files Browse the repository at this point in the history
* Since DispatchServer has handled the server correctly, so it should not be invalidated: https://github.com/Melledy/Grasscutter/blob/main/src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java#L402
  • Loading branch information
MlgmXyysd committed Apr 19, 2022
1 parent 30701cd commit df9b9eb
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#
##

from mitmproxy import ctx, http
from mitmproxy import http

class MlgmXyysd_Genshin_Impact_Proxy:

Expand Down Expand Up @@ -53,16 +53,13 @@ def request(self, flow: http.HTTPFlow) -> None:
"hk4e-sdk-os-static.hoyoverse.com",
"sdk-os-static.hoyoverse.com",
"api-account-os.hoyoverse.com",
"hk4e-sdk-os.hoyoverse.com"
"hk4e-sdk-os.hoyoverse.com",
"overseauspider.yuanshen.com"
]

if flow.request.url.startswith("http://overseauspider.yuanshen.com:8888/log"):
ctx.log.info("Block overseauspider.yuanshen.com")
flow.response = http.HTTPResponse.make(404)
elif flow.request.host in LIST_DOMAINS:
ctx.log.info("Redirect " + flow.request.host)
if flow.request.host in LIST_DOMAINS:
flow.request.host = REMOTE_HOST

addons = [
MlgmXyysd_Genshin_Impact_Proxy()
]
]

0 comments on commit df9b9eb

Please sign in to comment.