mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
fix bugs
This commit is contained in:
parent
6101d11d6c
commit
dc42e33505
@ -85,7 +85,7 @@ class PathodHandler(tcp.BaseHandler):
|
|||||||
self.use_http2 = False
|
self.use_http2 = False
|
||||||
self.http2_framedump = http2_framedump
|
self.http2_framedump = http2_framedump
|
||||||
|
|
||||||
def _handle_sni(self, connection):
|
def handle_sni(self, connection):
|
||||||
self.sni = connection.get_servername()
|
self.sni = connection.get_servername()
|
||||||
|
|
||||||
def http_serve_crafted(self, crafted, logctx):
|
def http_serve_crafted(self, crafted, logctx):
|
||||||
@ -132,8 +132,8 @@ class PathodHandler(tcp.BaseHandler):
|
|||||||
if isinstance(req, http.EmptyRequest):
|
if isinstance(req, http.EmptyRequest):
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
if isinstance(req, http.ConnectRequest):
|
if req.method == 'CONNECT':
|
||||||
return self.protocol.handle_http_connect([req.host, req.port, req.path], lg)
|
return self.protocol.handle_http_connect([req.host, req.port, req.httpversion], lg)
|
||||||
|
|
||||||
method = req.method
|
method = req.method
|
||||||
path = req.path
|
path = req.path
|
||||||
@ -239,7 +239,7 @@ class PathodHandler(tcp.BaseHandler):
|
|||||||
self.convert_to_ssl(
|
self.convert_to_ssl(
|
||||||
cert,
|
cert,
|
||||||
key,
|
key,
|
||||||
handle_sni=self._handle_sni,
|
handle_sni=self.handle_sni,
|
||||||
request_client_cert=self.server.ssloptions.request_client_cert,
|
request_client_cert=self.server.ssloptions.request_client_cert,
|
||||||
cipher_list=self.server.ssloptions.ciphers,
|
cipher_list=self.server.ssloptions.ciphers,
|
||||||
method=self.server.ssloptions.ssl_version,
|
method=self.server.ssloptions.ssl_version,
|
||||||
|
@ -56,7 +56,7 @@ class HTTPProtocol:
|
|||||||
self.pathod_handler.convert_to_ssl(
|
self.pathod_handler.convert_to_ssl(
|
||||||
cert,
|
cert,
|
||||||
key,
|
key,
|
||||||
handle_sni=self.pathod_handler._handle_sni,
|
handle_sni=self.pathod_handler.handle_sni,
|
||||||
request_client_cert=self.pathod_handler.server.ssloptions.request_client_cert,
|
request_client_cert=self.pathod_handler.server.ssloptions.request_client_cert,
|
||||||
cipher_list=self.pathod_handler.server.ssloptions.ciphers,
|
cipher_list=self.pathod_handler.server.ssloptions.ciphers,
|
||||||
method=self.pathod_handler.server.ssloptions.ssl_version,
|
method=self.pathod_handler.server.ssloptions.ssl_version,
|
||||||
|
Loading…
Reference in New Issue
Block a user