| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
We no longer use this anywhere, so ditch it.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
This is a preparatory patch that paves the way to consolidating our core
options in the core addon. It amalgamates the core_option_validation and core
addons, prepares the test suite for a world where options live in core, and
moves over two trivial options as a trial balloon.
From here, things will get harder, but at the end of the process we'll have a
core that's responsive to options.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found via `codespell -q 3 -I ../mitmproxy-word-whitelist.txt`
Where whitelist contains:
```
cas
doubleclick
nd
ot
seeked
statics
te
thru
```
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This takes the first few steps:
- Extends taddons to make loading addon options easier
- Removes dependencies in the test suite on options in addons
- Tweaks command-line parser autocreation to ignore nonexistent options. This
lets us load common options without over-depending on loaded addons.
|
| |
|
|
|
|
|
|
| |
SSL is an outdated protocol superseeded by TLS. Although the commonly
used library is called OpenSSL, it is no reason to still use outdated
language for attributes.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #2654
|
|
|
|
|
|
| |
- Remove shortcuts for request, response, etc. - we don't need them if we have completion
- Restrict cuts specification to a set of prefixes
- Extend cuts to add a few more items
|
| |
|
| |
|
|
|
|
|
|
| |
The proxy server should ultimately be an addon itself and not be passed
to the Master constructor. This commit already removes the server in the majority
of instances, and also replaces a large number of ProxyConfig usages with the Options class..
|
| |
|
| |
|
|
|
|
| |
Also support certificate types, which are converted to ASCII-encoded PEM format.
|
|
|
|
|
|
|
| |
Options:
streamfile -> save_stream_file
streamfile_filter -> save_stream_filter
|
|
|
|
|
|
|
| |
This is our first built-in command, which will be used by very many other
commands.
Also add a --commands option to dump all commands, analogous to --options.
|
|
|
|
|
|
|
|
| |
- Fix some loading sequence bugs affecting command-line script invocation
- Allow addons to over-ride existing options (with a warning). We need this for
reloading.
- Convert har_dump to new-style arguments, fix and re-instate its test suite.
- Covnert miscelaneous other exmples to new-style args.
|
|
|
|
|
| |
Options are now available globally on ctx, so the first argument of configure
is redundant.
|
|
|
|
|
|
|
|
| |
- Remove the watchdog dependency. We now just stat the script file every 2
seconds to check for an updated mtime.
- Further solidify our script testing, and in particular make the example tests
nicer. These should exemplify how we want users to test their own addon
scripts. More work on addon testing to follow.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Addons now nest, which means that addons can manage addons. This has a number
of salutary effects - the scripts addon no longer has to poke into the global
addons list, we no longer have to replace/remove/boot-outof parent addons when
we load scripts, and this paves the way for making our top-level tools into
addons themselves.
- All addon calls are now wrapped in a safe execution environment where
exceptions are caught, and output to stdout/stderr are intercepted and turned
into logs.
- We no longer support script arguments in sys.argv - creating an option
properly is the only way to pass arguments. This means that all scripts are
always directly controllable from interctive tooling, and that arguments are
type-checked.
For now, I've disabled testing of the har dump example - it needs to be moved
to the new argument handling, and become a class addon. I'll address that in a
separate patch.
|
|
|
|
|
| |
All events are now handled by addons, and we no longer support any events on
master.
|
|
|
|
|
| |
This also means expanding and tweaking the recording master API, which we
reflect through the current test suite
|
|
|
|
|
|
|
| |
This patch implements the lightweight event system I propose in #2144, adds a
custom event "processing_complete" that is triggered after file read, client
replay and server replay, and introduces a KeepServing addon to handle this for
mitmdump.
|
| |
|
| |
|
|
|
|
| |
fixes #2113
|
| |
|
|
|
|
|
| |
- Options are now explicitly initialized with an add_option method
- We have one canonical Options class - ditch dump.Options
|
| |
|
| |
|
| |
|
|
|
|
| |
fixes #1935
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|