Update proxy.py (#66)
This commit is contained in:
parent
794042d65f
commit
97b383e8d6
4
proxy.py
4
proxy.py
@ -18,7 +18,7 @@ def next_layer(nextlayer: layer.NextLayer):
|
|||||||
f"{nextlayer.data_client()[:70]=}\n"
|
f"{nextlayer.data_client()[:70]=}\n"
|
||||||
)
|
)
|
||||||
sni = nextlayer.context.client.sni
|
sni = nextlayer.context.client.sni
|
||||||
if nextlayer.context.client.tls and sni and (sni.endswith("yuanshen.com") or sni.endswith("mihoyo.com") or sni.endswith("hoyoverse.com") or sni.endswith("starrails.com")):
|
if nextlayer.context.client.tls and sni and (sni.endswith("yuanshen.com") or sni.endswith("mihoyo.com") or sni.endswith("hoyoverse.com") or sni.endswith("starrails.com") or sni.endswith("bhsr.com")):
|
||||||
ctx.log('sni:' + sni)
|
ctx.log('sni:' + sni)
|
||||||
nextlayer.context.server.address = ("127.0.0.1", 443)
|
nextlayer.context.server.address = ("127.0.0.1", 443)
|
||||||
|
|
||||||
@ -33,4 +33,4 @@ def request(flow: http.HTTPFlow) -> None:
|
|||||||
b"404 not found", # (optional) content
|
b"404 not found", # (optional) content
|
||||||
{"Content-Type": "text/html"} # (optional) headers
|
{"Content-Type": "text/html"} # (optional) headers
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user