aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlilydjwg <lilydjwg@gmail.com>2016-03-15 21:27:25 +0800
committerlilydjwg <lilydjwg@gmail.com>2016-03-15 21:32:06 +0800
commiteecadadce3defaeab955310ad77c874ec9aead5e (patch)
treee474e26797585586e5fcbcfb2f1c17df0d1a7d55
parent20ec502032cc360132ee2e3de72c66f75de33ad8 (diff)
downloadmitmproxy-eecadadce3defaeab955310ad77c874ec9aead5e.tar.gz
mitmproxy-eecadadce3defaeab955310ad77c874ec9aead5e.tar.bz2
mitmproxy-eecadadce3defaeab955310ad77c874ec9aead5e.zip
use "peer_address" instead of "sock_address"
-rw-r--r--mitmproxy/console/flowdetailview.py2
-rw-r--r--mitmproxy/flow_format_compat.py2
-rw-r--r--mitmproxy/models/connections.py2
-rw-r--r--netlib/tcp.py6
-rw-r--r--test/mitmproxy/tutils.py2
5 files changed, 7 insertions, 7 deletions
diff --git a/mitmproxy/console/flowdetailview.py b/mitmproxy/console/flowdetailview.py
index add2ebd0..8e3a47ae 100644
--- a/mitmproxy/console/flowdetailview.py
+++ b/mitmproxy/console/flowdetailview.py
@@ -23,7 +23,7 @@ def flowdetails(state, flow):
text.append(urwid.Text([("head", "Server Connection:")]))
parts = [
["Address", repr(sc.address)],
- ["Resolved", repr(sc.sock_address)],
+ ["Peer Address", repr(sc.peer_address)],
]
text.extend(
diff --git a/mitmproxy/flow_format_compat.py b/mitmproxy/flow_format_compat.py
index b96c6bcb..4c3aa727 100644
--- a/mitmproxy/flow_format_compat.py
+++ b/mitmproxy/flow_format_compat.py
@@ -35,7 +35,7 @@ def convert_015_016(data):
def convert_016_017(data):
- data["server_conn"]["sock_address"] = None
+ data["server_conn"]["peer_address"] = None
data["version"] = (0, 17)
return data
diff --git a/mitmproxy/models/connections.py b/mitmproxy/models/connections.py
index 6df67150..2ffc667d 100644
--- a/mitmproxy/models/connections.py
+++ b/mitmproxy/models/connections.py
@@ -120,7 +120,7 @@ class ServerConnection(tcp.TCPClient, stateobject.StateObject):
timestamp_tcp_setup=float,
timestamp_ssl_setup=float,
address=tcp.Address,
- sock_address=tcp.Address,
+ peer_address=tcp.Address,
source_address=tcp.Address,
cert=certutils.SSLCert,
ssl_established=bool,
diff --git a/netlib/tcp.py b/netlib/tcp.py
index 4d01a03b..574f3845 100644
--- a/netlib/tcp.py
+++ b/netlib/tcp.py
@@ -458,11 +458,11 @@ class _Connection(object):
def __init__(self, connection):
if connection:
self.connection = connection
- self.sock_address = Address(connection.getpeername())
+ self.peer_address = Address(connection.getpeername())
self._makefile()
else:
self.connection = None
- self.sock_address = None
+ self.peer_address = None
self.rfile = None
self.wfile = None
@@ -703,7 +703,7 @@ class TCPClient(_Connection):
'Error connecting to "%s": %s' %
(self.address.host, err))
self.connection = connection
- self.sock_address = Address(connection.getpeername())
+ self.peer_address = Address(connection.getpeername())
self._makefile()
def settimeout(self, n):
diff --git a/test/mitmproxy/tutils.py b/test/mitmproxy/tutils.py
index 99e83247..0d65df71 100644
--- a/test/mitmproxy/tutils.py
+++ b/test/mitmproxy/tutils.py
@@ -93,7 +93,7 @@ def tserver_conn():
c = ServerConnection.from_state(dict(
address=dict(address=("address", 22), use_ipv6=True),
source_address=dict(address=("address", 22), use_ipv6=True),
- sock_address=None,
+ peer_address=None,
cert=None,
timestamp_start=1,
timestamp_tcp_setup=2,