aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge pull request #3076 from clyfish/keepaliveAldo Cortesi2018-04-261-0/+2
|\ \ \ \ \ | | | | | | | | | | | | add SO_KEEPALIVE
| * | | | | add SO_KEEPALIVECheng Liangyu2018-04-251-0/+2
| | | | | |
* | | | | | Merge pull request #3071 from cortesi/ticklessAldo Cortesi2018-04-2643-327/+348
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | asyncio: shift script reloading out of the tick event
| * | | | | test: shift test_data out of our public APIAldo Cortesi2018-04-2333-229/+216
| | | | | |
| * | | | | addons/script: improve relability of reload testAldo Cortesi2018-04-234-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The granularity of mtime is surprisingly bad. Make the tests more robust against this, and promote has_log back to a public method, now that we have a few legitimate examples.
| * | | | | asyncio: shift script reloading out of the tick eventAldo Cortesi2018-04-2313-105/+133
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tick event is a nasty compromise, left over from when we didn't have an event loop. This is the first patch in a series that explores moving our built-in addons to managing coroutines on the eventloop directly for periodic tasks.
* | | | | Merge pull request #3077 from mhils/pytest-fixMaximilian Hils2018-04-253-3/+3
|\ \ \ \ \ | |/ / / / |/| | | | Fix pytest invocation errors
| * | | | fix pytest invocation errorsMaximilian Hils2018-04-253-3/+3
|/ / / /
* | | | Merge pull request #3070 from CorTal/Fix#3066Thomas Kriechbaumer2018-04-181-1/+1
|\ \ \ \ | | | | | | | | | | Fix asyncio.call_soon -> asyncio.ensure_future
| * | | | call_soon->ensure_futureCorTal2018-04-181-1/+1
|/ / / /
* | | | Merge pull request #3069 from cortesi/mwebAldo Cortesi2018-04-183-29/+8
|\ \ \ \ | | | | | | | | | | A grab-bag of mitmweb-related fixes
| * | | | mitmweb: don't blort all over my config fileAldo Cortesi2018-04-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Temporarily disable config saving until we can look at this more closely. Config saving should: - Only happen when explicitly requested by the user - Only save changed values
| * | | | tcp: As of Python 3.5, EINTR is retried automatically by selectAldo Cortesi2018-04-181-10/+1
| | | | | | | | | | | | | | | | | | | | See https://www.python.org/dev/peps/pep-0475/
| * | | | mitmweb: shift to use new run_loop wrapper on masterAldo Cortesi2018-04-181-14/+2
|/ / / / | | | | | | | | | | | | Fixes #3067
* | | | Merge pull request #3064 from cortesi/mexitAldo Cortesi2018-04-182-24/+29
|\ \ \ \ | | | | | | | | | | asyncio: fix exit behaviour for console
| * | | | asyncio: fix exit behavior for consoleAldo Cortesi2018-04-172-24/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add a master.run_loop function. This encapsulates our run behaviour so that it can be used by implementations that need to manage their own run loop (like urwid). - Shift crash exit message to the common core. I'm not convinced we really need this, but if we want it it should be centralised. - Clean up an extra exception that can be thrown by asyncio itself on "dirty" termination after a mitmproxy crash.
* | | | | Merge pull request #3063 from cortesi/sigsAldo Cortesi2018-04-172-17/+22
|\| | | | | | | | | | | | | | Ignore signal errors on windows + various fixes
| * | | | Ignore signal errors on windows + various fixesAldo Cortesi2018-04-172-17/+22
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Ignore the NotImplementedError raised by add_signal_handler on Windows. - Entrypoints return an integer exit code, or None. Adjust our type annotations and code to suit. Fixes #3061
* | | | Merge pull request #3048 from cortesi/qbenchAldo Cortesi2018-04-1719-51438/+112
|\ \ \ \ | |/ / / |/| | | Improve benchmarking
| * | | asyncio: clarify shutdown semanticsAldo Cortesi2018-04-166-27/+29
| | | | | | | | | | | | | | | | | | | | This patch clarifies proxy shutdown, and specifies that the master.shutdown() method is thread-save.
| * | | Clean up test/helper_tools directoryAldo Cortesi2018-04-165-51323/+0
| | | |
| * | | Improve benchmarkingAldo Cortesi2018-04-169-93/+88
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | - The benchmark addon now manages setting up and tearing down the backend and traffic processes itself. - Use wrk instead of hey. I get more consistent results with this tool, and hey shows a strange tail-latency bump that seems artificial. - Make termination behaviour simpler. The bencmark revealed a bug where .done events were not called if the proxy was shut down by an addon.
* | | Merge pull request #3059 from obscure76/enh/issue-3053Aldo Cortesi2018-04-1660-149/+149
|\ \ \ | | | | | | | | fix Python 3.6 variable type annotations #3053
| * | | fix Python 3.6 variable type annotations #3053oscure762018-04-1460-149/+149
| | | |
* | | | Merge pull request #3050 from kira0204/error-scriptAldo Cortesi2018-04-153-10/+29
|\ \ \ \ | | | | | | | | | | Handling user script's exceptions, fix #2839
| * | | | Handling user script exceptions, fix #2839kira02042018-04-103-10/+29
| | | | |
* | | | | Merge pull request #3057 from mitmproxy/requires-io-masterAldo Cortesi2018-04-151-2/+2
|\ \ \ \ \ | | | | | | | | | | | | [requires.io] dependency update on master branch
| * | | | | [requires.io] dependency updaterequires.io2018-04-141-1/+1
| | | | | |
| * | | | | [requires.io] dependency updaterequires.io2018-04-141-1/+1
| | |/ / / | |/| | |
* | | | | Merge pull request #3056 from cortesi/readfileAldo Cortesi2018-04-154-54/+99
|\ \ \ \ \ | |/ / / / |/| | | | readfile fixes
| * | | | mitmdump: also set dumper_filter to default filter on startupAldo Cortesi2018-04-141-0/+1
| | | | | | | | | | | | | | | | | | | | Fixes #3051
| * | | | readfile: add a readfile_filter optionAldo Cortesi2018-04-144-40/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a readfile_filter option that filters flows on read. * Adjust test suite for asyncio. * Add asynctest as a dev dependency.
| * | | | asyncio: adjust readfile.py addon for asyncAldo Cortesi2018-04-142-14/+17
| | | | |
* | | | | Merge pull request #3054 from Kriechi/fix-exampleAldo Cortesi2018-04-141-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | fix example filename
| * | | | fix example filenameThomas Kriechbaumer2018-04-131-1/+1
|/ / / /
* / / / fix GA idMaximilian Hils2018-04-111-1/+1
|/ / /
* | | Merge pull request #3035 from cortesi/aiosimplerAldo Cortesi2018-04-0735-295/+285
|\ \ \ | | | | | | | | asyncio consolidation
| * | | asyncio: ditch the handler contextAldo Cortesi2018-04-077-54/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few reasons for this. First, logs are now async, and can be called at any time. Second, the event loop is thread local, so there can only ever be one master per thread. These two things together completely obviate the need for a handler context.
| * | | asyncio: remove master.add_log, in favor of a persistent log.Log instanceAldo Cortesi2018-04-076-25/+12
| | | |
| * | | asyncio: remove test master.has_logAldo Cortesi2018-04-077-30/+40
| | | | | | | | | | | | | | | | | | | | Now that logs are async, using this call is almost always a mistake. Signal this by making it semi-private. The method may go away entirely down the track.
| * | | asyncio: move log mechanism onto the event loopAldo Cortesi2018-04-0721-94/+128
| | | | | | | | | | | | | | | | | | | | | | | | Logs are now asynchronous, with a log entry pushed onto the event loop for handling. To support this, the test mechanism grows an await_log method that waits for a log entry to appear.
| * | | asyncio simplify: we don't need a queue for proxy->main loop commsAldo Cortesi2018-04-0713-85/+83
| | | | | | | | | | | | | | | | Instead, we just schedule coroutines directly onto the core loop.
| * | | asyncio: remove last vestiage of channel input from masterAldo Cortesi2018-04-073-17/+11
|/ / /
* | | Merge pull request #3031 from itzikBraun/add-httpie-exportAldo Cortesi2018-04-062-4/+52
|\ \ \ | | | | | | | | added option to export request as httpie command
| * | | added option to export request as httpie commanditzikBraun2018-04-022-4/+52
| | | |
* | | | Merge pull request #2971 from kira0204/user-script-exceptionAldo Cortesi2018-04-062-6/+38
|\ \ \ \ | | | | | | | | | | A unified handler for user's scripts exception
| * | | | use error handler functionkira02042018-03-262-7/+7
| | | | |
| * | | | User script exception handler[squash]kira02042018-03-072-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixing 2837, added test unified-function deleting the wrong commit
* | | | | Merge pull request #3046 from cortesi/backlogAldo Cortesi2018-04-061-2/+1
|\ \ \ \ \ | | | | | | | | | | | | Remove socket listen backlog constraint
| * | | | | Remove socket listen backlog constraintAldo Cortesi2018-04-061-2/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | I have no idea why we did this, but the default value is 128, and setting it this low drops connections under conditions our users can reasonably be expeted to reach.