mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-16 04:45:34 +00:00
properly pass ip into proy script
This commit is contained in:
parent
7bfb9a7113
commit
baceadf8cc
@ -6,7 +6,10 @@ SET ip=%1
|
||||
SET gamePath=%2
|
||||
SET gamePath=%gamePath:"=%
|
||||
|
||||
start "Proxy Server" ./ext/mitmdump.exe -s "./proxy/proxy.py" --ssl-insecure
|
||||
start "Proxy Server" ./ext/mitmdump.exe -s "./proxy/proxy.py" --ssl-insecure --set ip=%ip%
|
||||
|
||||
:: Allow the proxy to start
|
||||
ping 192.0.2.2 -n 1 -w 5000 > nul
|
||||
|
||||
echo Opening %gamePath%/Genshin Impact Game/GenshinImpact.exe
|
||||
|
||||
|
@ -20,14 +20,23 @@
|
||||
#
|
||||
##
|
||||
|
||||
import string
|
||||
from mitmproxy import ctx
|
||||
from mitmproxy import http
|
||||
|
||||
class MlgmXyysd_Genshin_Impact_Proxy:
|
||||
|
||||
def request(self, flow: http.HTTPFlow) -> None:
|
||||
def load(self, loader):
|
||||
loader.add_option(
|
||||
name = "ip",
|
||||
typespec = str,
|
||||
default = "localhost",
|
||||
help = "IP address to replace",
|
||||
)
|
||||
|
||||
def request(self, flow: http.HTTPFlow) -> None:
|
||||
# This can also be replaced with another IP address.
|
||||
REMOTE_HOST = "localhost"
|
||||
REMOTE_HOST = ctx.options.ip
|
||||
|
||||
LIST_DOMAINS = [
|
||||
"api-os-takumi.mihoyo.com",
|
||||
|
Loading…
Reference in New Issue
Block a user