mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-08-14 13:11:48 +08: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=%2
|
||||||
SET gamePath=%gamePath:"=%
|
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
|
echo Opening %gamePath%/Genshin Impact Game/GenshinImpact.exe
|
||||||
|
|
||||||
|
@ -20,14 +20,23 @@
|
|||||||
#
|
#
|
||||||
##
|
##
|
||||||
|
|
||||||
|
import string
|
||||||
|
from mitmproxy import ctx
|
||||||
from mitmproxy import http
|
from mitmproxy import http
|
||||||
|
|
||||||
class MlgmXyysd_Genshin_Impact_Proxy:
|
class MlgmXyysd_Genshin_Impact_Proxy:
|
||||||
|
|
||||||
|
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:
|
def request(self, flow: http.HTTPFlow) -> None:
|
||||||
|
|
||||||
# This can also be replaced with another IP address.
|
# This can also be replaced with another IP address.
|
||||||
REMOTE_HOST = "localhost"
|
REMOTE_HOST = ctx.options.ip
|
||||||
|
|
||||||
LIST_DOMAINS = [
|
LIST_DOMAINS = [
|
||||||
"api-os-takumi.mihoyo.com",
|
"api-os-takumi.mihoyo.com",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user