Improve the way we handle upstream errors

- Don't log a traceback for either HTTP or HTTPS DNS resolution or TCP
connection errors. These are "ordinary" errors, not mitmproxy issues.
- Ensure that the error handler is correctly called for SSL-related protocol
errors.
This commit is contained in:
Aldo Cortesi
2016-09-01 12:32:09 +12:00
parent 9306e80e65
commit afe34e8b28
2 changed files with 39 additions and 27 deletions

View File

@@ -32,8 +32,8 @@ class MyMaster(flow.FlowMaster):
print("error", f)
@controller.handler
def log(self, f):
print("log", f)
def log(self, l):
print("log", l.msg)
opts = options.Options(cadir="~/.mitmproxy/")
config = ProxyConfig(opts)