| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We've had a perpetual sequencing problem with addon startup. Users need to be
able to specify options to addons on the command-line, before addons are
actually loaded. This is only exacerbated with the new async core, where load
order can't be relied on.
This patch introduces deferred options. Options passed with "--set" on the
command line are deferred if they are unknown, and are automatically applied by
the addon manager once matching addons are registered and their options are defined.
|
| |
|
|
|
|
|
|
|
|
|
| |
We now have two options: block_global blocks global networks, block_private
blocks private networks. The block_global option is true by default, and
block_private is false by default. The addon name is "block" so the options are
correctly prefixed.
Also make option documentation precise, reduce verbosity of logs.
|
|\
| |
| | |
fix #3024
|
| | |
|
| |
| |
| |
| |
| | |
These were always weird, and were added to support exit when processing
completed to mitmdump. We now have better ways to do this.
|
| |
| |
| |
| | |
Mitmproxy: the tickless wonder.
|
| |
| |
| |
| | |
We no longer use this anywhere, so ditch it.
|
| |
| |
| |
| |
| |
| |
| |
| | |
- Instead of listening for a pseudo-event, we periodically check whether client
replay, server replay or file reading is active.
- Adjust server replay not to
use tick.
- Adjust readfile to expose a command to check whether reading is in progress.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Re-design the way client replay works. Before, we would fire up a thread,
replay, wait for the thread to complete, get the next flow, and repeat the
procedure. Now, we have one replay thread that starts when the addon starts,
which pops flows off a thread-safe queue. This is much cleaner, removes the
need for busy tick, and sets the scene for optimisations like server connection
reuse down the track.
|
| | |
|
|\ \
| | |
| | | |
Fix #3002. Auto-expanding for tilda.
|
| | | |
|
|\ \ \
| |/ /
|/| | |
asyncio: shift script reloading out of the tick event
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
| |
| |
| |
| |
| | |
This patch clarifies proxy shutdown, and specifies that the master.shutdown()
method is thread-save.
|
| | |
|
|/
|
|
|
|
|
|
|
| |
- 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.
|
|\
| |
| | |
fix Python 3.6 variable type annotations #3053
|
| | |
|
|\ \
| | |
| | | |
Handling user script's exceptions, fix #2839
|
| |/ |
|
|/
|
|
|
|
| |
* Add a readfile_filter option that filters flows on read.
* Adjust test suite for asyncio.
* Add asynctest as a dev dependency.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Instead, we just schedule coroutines directly onto the core loop.
|
| |
|
|\
| |
| | |
added option to export request as httpie command
|
| | |
|
|\ \
| | |
| | | |
A unified handler for user's scripts exception
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
fixing 2837, added test
unified-function
deleting the wrong commit
|
| | |
| | |
| | |
| | | |
this fixes #3038
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Also fix a racy websocket test.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Also silence asyncio logs. We sometimes end up with messages on the queue that
need to be ignored when the proxy shuts down, and asyncio complains loudly
about this.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
We now need to synthesize a tick event when changing addons in tests, because
tick is asynchronously called on the event loop.
|
| | |
| | |
| | |
| | |
| | | |
Also move signal handling out of master. These only work in the main thread,
and properly belong in main.py.
|