diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-10-18 18:29:35 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-10-18 18:29:35 +0200 |
commit | e1148584380058f264b7aa7e9493115e4e8f2bbe (patch) | |
tree | d90acc5576e36808a1dea9907fe0b92130c45292 /libmproxy/protocol/http.py | |
parent | 52b29d49264e1397db6c65ee773479391b3fd37a (diff) | |
download | mitmproxy-e1148584380058f264b7aa7e9493115e4e8f2bbe.tar.gz mitmproxy-e1148584380058f264b7aa7e9493115e4e8f2bbe.tar.bz2 mitmproxy-e1148584380058f264b7aa7e9493115e4e8f2bbe.zip |
add generic tcp proxying, fix #374
Diffstat (limited to 'libmproxy/protocol/http.py')
-rw-r--r-- | libmproxy/protocol/http.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index 32a88b4b..33d860ca 100644 --- a/libmproxy/protocol/http.py +++ b/libmproxy/protocol/http.py @@ -1260,9 +1260,9 @@ class HTTPHandler(ProtocolHandler): Returns False, if the connection should be closed immediately. """ address = tcp.Address.wrap(address) - if self.c.check_ignore_address(address): + if self.c.config.check_ignore(address): self.c.log("Ignore host: %s:%s" % address(), "info") - TCPHandler(self.c).handle_messages() + TCPHandler(self.c, log=False).handle_messages() return False else: self.expected_form_in = "relative" @@ -1274,6 +1274,11 @@ class HTTPHandler(ProtocolHandler): self.c.establish_ssl(server=True, client=True) self.c.log("Upgrade to SSL completed.", "debug") + if self.c.config.check_tcp(address): + self.c.log("Generic TCP mode for host: %s:%s" % address(), "info") + TCPHandler(self.c).handle_messages() + return False + return True def authenticate(self, request): |