mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
add resolved IP address in "Details" tab
This commit is contained in:
parent
b413a052f9
commit
e9bff5ac56
@ -23,6 +23,7 @@ def flowdetails(state, flow):
|
||||
text.append(urwid.Text([("head", "Server Connection:")]))
|
||||
parts = [
|
||||
["Address", repr(sc.address)],
|
||||
["Resolved", repr(sc.sock_address)],
|
||||
]
|
||||
|
||||
text.extend(
|
||||
|
@ -35,6 +35,7 @@ def convert_015_016(data):
|
||||
|
||||
|
||||
def convert_016_017(data):
|
||||
data["server_conn"]["sock_address"] = None
|
||||
data["version"] = (0, 17)
|
||||
return data
|
||||
|
||||
|
@ -120,6 +120,7 @@ class ServerConnection(tcp.TCPClient, stateobject.StateObject):
|
||||
timestamp_tcp_setup=float,
|
||||
timestamp_ssl_setup=float,
|
||||
address=tcp.Address,
|
||||
sock_address=tcp.Address,
|
||||
source_address=tcp.Address,
|
||||
cert=certutils.SSLCert,
|
||||
ssl_established=bool,
|
||||
|
@ -458,9 +458,11 @@ class _Connection(object):
|
||||
def __init__(self, connection):
|
||||
if connection:
|
||||
self.connection = connection
|
||||
self.sock_address = Address(connection.getpeername())
|
||||
self._makefile()
|
||||
else:
|
||||
self.connection = None
|
||||
self.sock_address = None
|
||||
self.rfile = None
|
||||
self.wfile = None
|
||||
|
||||
@ -701,6 +703,7 @@ class TCPClient(_Connection):
|
||||
'Error connecting to "%s": %s' %
|
||||
(self.address.host, err))
|
||||
self.connection = connection
|
||||
self.sock_address = Address(connection.getpeername())
|
||||
self._makefile()
|
||||
|
||||
def settimeout(self, n):
|
||||
|
Loading…
Reference in New Issue
Block a user