Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
af88b4cf
Commit
af88b4cf
authored
Apr 20, 2022
by
Melledy
Committed by
GitHub
Apr 20, 2022
Browse files
Merge pull request #46 from MlgmXyysd/main
Optimize proxy scripts
parents
86694158
087cd680
Changes
2
Show whitespace changes
Inline
Side-by-side
proxy.py
View file @
af88b4cf
...
...
@@ -21,14 +21,10 @@
##
from
mitmproxy
import
http
from
proxy_config
import
REMOTE_HOST
class
MlgmXyysd_Genshin_Impact_Proxy
:
def
request
(
self
,
flow
:
http
.
HTTPFlow
)
->
None
:
# This can also be replaced with another IP address.
REMOTE_HOST
=
"localhost"
LIST_DOMAINS
=
[
"api-os-takumi.mihoyo.com"
,
"hk4e-api-os-static.mihoyo.com"
,
...
...
@@ -54,10 +50,16 @@ class MlgmXyysd_Genshin_Impact_Proxy:
"sdk-os-static.hoyoverse.com"
,
"api-account-os.hoyoverse.com"
,
"hk4e-sdk-os.hoyoverse.com"
,
"overseauspider.yuanshen.com"
"overseauspider.yuanshen.com"
,
"gameapi-account.mihoyo.com"
,
"minor-api.mihoyo.com"
,
"public-data-api.mihoyo.com"
,
"uspider.yuanshen.com"
,
"sdk-static.mihoyo.com"
]
if
flow
.
request
.
host
in
LIST_DOMAINS
:
def
request
(
self
,
flow
:
http
.
HTTPFlow
)
->
None
:
if
flow
.
request
.
host
in
self
.
LIST_DOMAINS
:
flow
.
request
.
host
=
REMOTE_HOST
addons
=
[
...
...
proxy_config.py
0 → 100644
View file @
af88b4cf
# This can also be replaced with another IP address.
REMOTE_HOST
=
"localhost"
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment