diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index 3d0257391..1325aae59 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -201,7 +201,10 @@ class StatusBar(common.WWrap): ] if self.master.server.bound: - boundaddr = "[%s:%s]"%(self.master.server.address.host or "*", self.master.server.address.port) + host = self.master.server.address.host + if host == "0.0.0.0": + host = "*" + boundaddr = "[%s:%s]"%(host, self.master.server.address.port) else: boundaddr = "" t.extend(self.get_status()) diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index 038fde973..971455f7e 100644 --- a/libmproxy/protocol/http.py +++ b/libmproxy/protocol/http.py @@ -1068,7 +1068,7 @@ class HTTPHandler(ProtocolHandler): message += " The client does not trust the proxy's certificate." if isinstance(error, tcp.NetLibDisconnect): - self.c.log("TCP connection closed unexpectedly.", "debug", [repr(error)]) + self.c.log("TCP connection closed unexpectedly.", "debug") else: self.c.log("error: %s" % message, level="info") diff --git a/libmproxy/protocol/tcp.py b/libmproxy/protocol/tcp.py index 8411ba6cf..57a48ab93 100644 --- a/libmproxy/protocol/tcp.py +++ b/libmproxy/protocol/tcp.py @@ -66,5 +66,5 @@ class TCPHandler(ProtocolHandler): # self.c.log("%s %s\r\n%s" % (direction, dst_str, cleanBin(buf.tobytes())), "debug") dst.connection.send(buf[:size]) except socket.error as e: - self.c.log("TCP connection closed unexpectedly.", "debug", [repr(e)]) + self.c.log("TCP connection closed unexpectedly.", "debug") return \ No newline at end of file