diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index 83145f663..c1ef43319 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -171,7 +171,11 @@ class StatusBar(common.WWrap): if self.master.server.config.get_upstream_server and \ isinstance(self.master.server.config.get_upstream_server, proxy.ConstUpstreamServerResolver): - r.append("[dest:%s]"%utils.unparse_url(*self.master.server.config.get_upstream_server.dst)) + dst = self.master.server.config.get_upstream_server.dst + scheme = "https" if dst[0] else "http" + if dst[1] != dst[0]: + scheme += "2https" if dst[1] else "http" + r.append("[dest:%s]"%utils.unparse_url(scheme, *self.master.server.config.get_upstream_server.dst[2:])) if self.master.scripts: r.append("[scripts:%s]"%len(self.master.scripts)) # r.append("[lt:%0.3f]"%self.master.looptime) @@ -646,7 +650,6 @@ class ConsoleMaster(flow.FlowMaster): self.statusbar = StatusBar(self, flowview.footer) self.state.set_focus_flow(flow) self.state.view_mode = common.VIEW_FLOW - self.make_view() self.help_context = flowview.help_context diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index ded2362e9..a1be6a17c 100644 --- a/libmproxy/protocol/http.py +++ b/libmproxy/protocol/http.py @@ -485,6 +485,8 @@ class HTTPRequest(HTTPMessage): If hostheader is True, we use the value specified in the request Host header to construct the URL. """ + if self.form_out == "authority": # upstream proxy mode + return "%s:%s" % (self.get_host(hostheader), self.get_port()) return utils.unparse_url(self.get_scheme(), self.get_host(hostheader), self.get_port(),