mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-01-30 23:09:44 +00:00
fix #951
This commit is contained in:
parent
614e2ebf29
commit
e8611acb76
@ -8,6 +8,7 @@ import Cookie
|
|||||||
import cookielib
|
import cookielib
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import time
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
from netlib import wsgi
|
from netlib import wsgi
|
||||||
@ -828,17 +829,24 @@ class FlowMaster(controller.Master):
|
|||||||
"""
|
"""
|
||||||
c = ClientConnection.from_state(dict(
|
c = ClientConnection.from_state(dict(
|
||||||
address=dict(address=(host, port), use_ipv6=False),
|
address=dict(address=(host, port), use_ipv6=False),
|
||||||
clientcert=None
|
clientcert=None,
|
||||||
|
ssl_established=False,
|
||||||
|
timestamp_start=time.time(),
|
||||||
|
timestamp_end=time.time(),
|
||||||
|
timestamp_ssl_setup=time.time()
|
||||||
))
|
))
|
||||||
|
|
||||||
s = ServerConnection.from_state(dict(
|
s = ServerConnection.from_state(dict(
|
||||||
address=dict(address=(host, port), use_ipv6=False),
|
address=dict(address=(host, port), use_ipv6=False),
|
||||||
state=[],
|
|
||||||
source_address=None,
|
|
||||||
# source_address=dict(address=(host, port), use_ipv6=False),
|
|
||||||
cert=None,
|
cert=None,
|
||||||
sni=host,
|
sni=host,
|
||||||
ssl_established=True
|
source_address=dict(address=('', 0), use_ipv6=False),
|
||||||
|
ssl_established=True,
|
||||||
|
timestamp_start=time.time(),
|
||||||
|
timestamp_tcp_setup=time.time(),
|
||||||
|
timestamp_ssl_setup=time.time(),
|
||||||
|
timestamp_end=None,
|
||||||
|
via=None
|
||||||
))
|
))
|
||||||
f = HTTPFlow(c, s)
|
f = HTTPFlow(c, s)
|
||||||
headers = Headers()
|
headers = Headers()
|
||||||
@ -852,10 +860,8 @@ class FlowMaster(controller.Master):
|
|||||||
path,
|
path,
|
||||||
b"HTTP/1.1",
|
b"HTTP/1.1",
|
||||||
headers,
|
headers,
|
||||||
None,
|
b""
|
||||||
None,
|
)
|
||||||
None,
|
|
||||||
None)
|
|
||||||
f.request = req
|
f.request = req
|
||||||
return self.load_flow(f)
|
return self.load_flow(f)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user