代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/python-mitmproxy 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff -Nur mitmproxy-7.0.0/mitmproxy/contentviews/__init__.py mitmproxy-7.0.0-1/mitmproxy/contentviews/__init__.py
--- mitmproxy-7.0.0/mitmproxy/contentviews/__init__.py 2021-07-16 16:24:38.000000000 +0800
+++ mitmproxy-7.0.0-1/mitmproxy/contentviews/__init__.py 2021-08-04 15:27:39.221691053 +0800
@@ -99,8 +99,10 @@
http_message = None
if isinstance(message, http.Message):
http_message = message
- if ctype := message.headers.get("content-type"):
- if ct := http.parse_content_type(ctype):
+ ctype_tmp = message.headers.get("content-type")
+ if ctype == ctype_tmp:
+ ct_tmp = http.parse_content_type(ctype)
+ if ct == ct_tmp:
content_type = f"{ct[0]}/{ct[1]}"
description, lines, error = get_content_view(
diff -Nur mitmproxy-7.0.0/mitmproxy/net/tls.py mitmproxy-7.0.0-1/mitmproxy/net/tls.py
--- mitmproxy-7.0.0/mitmproxy/net/tls.py 2021-07-16 16:24:38.000000000 +0800
+++ mitmproxy-7.0.0-1/mitmproxy/net/tls.py 2021-08-04 15:32:53.086778204 +0800
@@ -106,7 +106,7 @@
ok += SSL._lib.SSL_CTX_set_max_proto_version(context._context, max_version.value) # type: ignore
if ok != 2:
raise RuntimeError(
- f"Error setting TLS versions ({min_version=}, {max_version=}). "
+ f"Error setting TLS versions ({min_version}, {max_version}). "
"The version you specified may be unavailable in your libssl."
)
@@ -177,7 +177,7 @@
try:
context.load_verify_locations(ca_pemfile, ca_path)
except SSL.Error as e:
- raise RuntimeError(f"Cannot load trusted certificates ({ca_pemfile=}, {ca_path=}).") from e
+ raise RuntimeError(f"Cannot load trusted certificates ({ca_pemfile}, {ca_path}).") from e
# Client Certs
if client_cert:
diff -Nur mitmproxy-7.0.0/mitmproxy/proxy/layers/http/__init__.py mitmproxy-7.0.0-1/mitmproxy/proxy/layers/http/__init__.py
--- mitmproxy-7.0.0/mitmproxy/proxy/layers/http/__init__.py 2021-07-16 16:24:38.000000000 +0800
+++ mitmproxy-7.0.0-1/mitmproxy/proxy/layers/http/__init__.py 2021-08-04 15:30:16.424239006 +0800
@@ -148,8 +148,8 @@
else:
self.flow = event.replay_flow
self.flow.request = event.request
-
- if err := validate_request(self.mode, self.flow.request):
+ err_tmp = validate_request(self.mode, self.flow.request)
+ if err == err_tmp:
self.flow.response = http.Response.make(502, str(err))
self.client_state = self.state_errored
return (yield from self.send_response())
diff -Nur mitmproxy-7.0.0/mitmproxy/proxy/server.py mitmproxy-7.0.0-1/mitmproxy/proxy/server.py
--- mitmproxy-7.0.0/mitmproxy/proxy/server.py 2021-07-16 16:24:38.000000000 +0800
+++ mitmproxy-7.0.0-1/mitmproxy/proxy/server.py 2021-08-04 15:31:48.925738277 +0800
@@ -142,7 +142,8 @@
server=command.connection
)
await self.handle_hook(server_hooks.ServerConnectHook(hook_data))
- if err := command.connection.error:
+ err_tmp = command.connection.error
+ if err == err_tmp:
self.log(f"server connection to {human.format_address(command.connection.address)} killed before connect: {err}")
self.server_event(events.OpenConnectionCompleted(command, f"Connection killed: {err}"))
return
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。